aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-01-28 15:38:49 +0100
committerHans Bolinder <[email protected]>2014-01-28 15:38:49 +0100
commita0119e4bff42f3ef38df6c9e8bdd1ba40eb49887 (patch)
tree944b2bb9a333591ff6e4cde694386616407b62f5 /lib/dialyzer/src/dialyzer.erl
parent127cd6d32a8f5e3ffd56b13ea8f333eeffa253a2 (diff)
parent7db0bb7ae867ea5de893914a89c51dc0369b5790 (diff)
downloadotp-a0119e4bff42f3ef38df6c9e8bdd1ba40eb49887.tar.gz
otp-a0119e4bff42f3ef38df6c9e8bdd1ba40eb49887.tar.bz2
otp-a0119e4bff42f3ef38df6c9e8bdd1ba40eb49887.zip
Merge branch 'hb/dialyzer/opaque_types_fixes/OTP-10397'
* hb/dialyzer/opaque_types_fixes/OTP-10397: [dialyzer] Re-work the handling of opaque types
Diffstat (limited to 'lib/dialyzer/src/dialyzer.erl')
-rw-r--r--lib/dialyzer/src/dialyzer.erl15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index 35156afff2..bb7e39dfda 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -423,6 +423,9 @@ message_to_string({call_without_opaque, [M, F, Args, ExpectedTriples]}) ->
message_to_string({opaque_eq, [Type, _Op, OpaqueType]}) ->
io_lib:format("Attempt to test for equality between a term of type ~s"
" and a term of opaque type ~s\n", [Type, OpaqueType]);
+message_to_string({opaque_guard, [Arg1, Infix, Arg2, ArgNs]}) ->
+ io_lib:format("Guard test ~s ~s ~s contains ~s\n",
+ [Arg1, Infix, Arg2, form_positions(ArgNs)]);
message_to_string({opaque_guard, [Guard, Args]}) ->
io_lib:format("Guard test ~w~s breaks the opaqueness of its argument\n",
[Guard, Args]);
@@ -435,8 +438,16 @@ message_to_string({opaque_match, [Pat, OpaqueType, OpaqueTerm]}) ->
message_to_string({opaque_neq, [Type, _Op, OpaqueType]}) ->
io_lib:format("Attempt to test for inequality between a term of type ~s"
" and a term of opaque type ~s\n", [Type, OpaqueType]);
-message_to_string({opaque_type_test, [Fun, Opaque]}) ->
- io_lib:format("The type test ~s(~s) breaks the opaqueness of the term ~s\n", [Fun, Opaque, Opaque]);
+message_to_string({opaque_type_test, [Fun, Args, Arg, ArgType]}) ->
+ io_lib:format("The type test ~s~s breaks the opaqueness of the term ~s~s\n",
+ [Fun, Args, Arg, ArgType]);
+message_to_string({opaque_size, [SizeType, Size]}) ->
+ io_lib:format("The size ~s breaks the opaqueness of ~s\n",
+ [SizeType, Size]);
+message_to_string({opaque_call, [M, F, Args, Culprit, OpaqueType]}) ->
+ io_lib:format("The call ~s:~s~s breaks the opaqueness of the term ~s :: ~s\n",
+ [M, F, Args, Culprit, OpaqueType]);
+
%%----- Warnings for concurrency errors --------------------
message_to_string({race_condition, [M, F, Args, Reason]}) ->
io_lib:format("The call ~w:~w~s ~s\n", [M, F, Args, Reason]);