diff options
author | Hans Bolinder <[email protected]> | 2016-11-15 16:03:18 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-11-22 10:29:04 +0100 |
commit | a202c2e0fa1f7810fb19c5a051369ce8b308ebc1 (patch) | |
tree | 419bf3fc59eec3dd109d8da50a8f08b50d91c702 /lib/dialyzer/test/opaque_SUITE_data/results/simple | |
parent | c79e32a66c366bbdf5025ad0ae7f7057a0ddb156 (diff) | |
download | otp-a202c2e0fa1f7810fb19c5a051369ce8b308ebc1.tar.gz otp-a202c2e0fa1f7810fb19c5a051369ce8b308ebc1.tar.bz2 otp-a202c2e0fa1f7810fb19c5a051369ce8b308ebc1.zip |
dialyzer: Improve a warning message
Messages like "Invalid type specification for function
para3:exp_adt/0. The success typing is () -> 3" now look like
"The specification for para3:exp_adt/0 has an opaque subtype
para3_adt:exp1(para3_adt:exp2()) which is violated by the success
typing () -> 3".
The old message did not give any clue as to what invalidated the
contract, namely the opaque subtype.
Diffstat (limited to 'lib/dialyzer/test/opaque_SUITE_data/results/simple')
-rw-r--r-- | lib/dialyzer/test/opaque_SUITE_data/results/simple | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/simple b/lib/dialyzer/test/opaque_SUITE_data/results/simple index 5a7f006d8c..0fdf07d1fe 100644 --- a/lib/dialyzer/test/opaque_SUITE_data/results/simple +++ b/lib/dialyzer/test/opaque_SUITE_data/results/simple @@ -22,7 +22,7 @@ rec_api.erl:24: Record construction #r1{f1::10} violates the declared type of fi rec_api.erl:29: Matching of pattern {'r1', 10} tagged with a record name violates the declared type of #r1{f1::10} rec_api.erl:33: The attempt to match a term of type rec_adt:r1() against the pattern {'r1', 'a'} breaks the opaqueness of the term rec_api.erl:35: Invalid type specification for function rec_api:adt_t1/1. The success typing is (#r1{f1::'a'}) -> #r1{f1::'a'} -rec_api.erl:40: Invalid type specification for function rec_api:adt_r1/0. The success typing is () -> #r1{f1::'a'} +rec_api.erl:40: The specification for rec_api:adt_r1/0 has an opaque subtype rec_adt:r1() which is violated by the success typing () -> #r1{f1::'a'} rec_api.erl:85: The attempt to match a term of type rec_adt:f() against the record field 'f' declared to be of type rec_api:f() breaks the opaqueness of the term rec_api.erl:99: Record construction #r2{f1::10} violates the declared type of field f1::rec_api:a() simple1_api.erl:113: The test simple1_api:d1() =:= simple1_api:d2() can never evaluate to 'true' @@ -79,7 +79,7 @@ simple1_api.erl:538: Guard test A::simple1_adt:d1() =:= 3 contains an opaque ter simple1_api.erl:548: The call erlang:'<'(A::simple1_adt:d1(),3) contains an opaque term as 1st argument when terms of different types are expected in these positions simple1_api.erl:558: The call erlang:'=<'(A::simple1_adt:d1(),B::simple1_adt:d2()) contains opaque terms as 1st and 2nd arguments when terms of different types are expected in these positions simple1_api.erl:565: Guard test {digraph:graph(),3} > {digraph:graph(),atom() | ets:tid()} contains an opaque term as 2nd argument -simple1_api.erl:91: Invalid type specification for function simple1_api:tup/0. The success typing is () -> {'a','b'} +simple1_api.erl:91: The specification for simple1_api:tup/0 has an opaque subtype simple1_adt:tuple1() which is violated by the success typing () -> {'a','b'} simple2_api.erl:100: The call lists:flatten(A::simple1_adt:tuple1()) contains an opaque term as 1st argument when a structured term of type [any()] is expected simple2_api.erl:116: The call lists:flatten({simple1_adt:tuple1()}) will never return since it differs in the 1st argument from the success typing arguments: ([any()]) simple2_api.erl:121: Guard test {simple1_adt:d1(),3} > {simple1_adt:d1(),simple1_adt:tuple1()} contains an opaque term as 2nd argument |