From b109768baf023a0814bda37b452582c7b396ada2 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 5 May 2015 16:11:12 +0200 Subject: dialyzer: Modify warning for comparison of opaque types Comparing two operands for (in)equality is allowed if both operands are of the same unknown opaque type. Since OTP 17, there is a warning if the types of the operands have nothing in common (this cannot happen before OTP 17). However, the warning says there is a test between opaque types, which is wrong. The warning now states that the comparison cannot evaluate to 'true', which is more consistent. --- lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl') diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl index eef2074e0c..7db1100597 100644 --- a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl +++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl @@ -145,7 +145,7 @@ adt_t4() -> A = simple1_adt:n1(), B = simple1_adt:n2(), A = A, % OK - A = B. % opaque term + A = B. % opaque terms adt_t7() -> A = simple1_adt:n1(), @@ -178,7 +178,7 @@ c2(A, B) -> c2() -> A = simple1_adt:d1(), B = simple1_adt:d2(), - if A =< B -> ok end. % opaque term + if A =< B -> ok end. % opaque terms c3() -> B = simple1_adt:d2(), @@ -516,7 +516,7 @@ eq1() -> A = simple1_adt:d2(), B = simple1_adt:d1(), if - A == B -> % opaque term + A == B -> % opaque terms 0; A == A -> 1; @@ -555,7 +555,7 @@ c6(A, B) -> c7(A, B) -> A = simple1_adt:d1(), B = simple1_adt:d2(), - A =< B. % opaque term + A =< B. % opaque terms c8() -> D = digraph:new(), -- cgit v1.2.3