aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-10-28 16:54:29 +0200
committerStavros Aronis <[email protected]>2011-11-18 15:06:39 +0100
commitd101155c5dc115a51725b52e500c9a981845f2da (patch)
treec433d52c42da87a03a1aba58bc9b23c1a51bd19f /lib/dialyzer/src/dialyzer.erl
parent7fde343786329e7465a53c1d2f36e9436343e387 (diff)
downloadotp-d101155c5dc115a51725b52e500c9a981845f2da.tar.gz
otp-d101155c5dc115a51725b52e500c9a981845f2da.tar.bz2
otp-d101155c5dc115a51725b52e500c9a981845f2da.zip
Behaviour callback discrepancy detection for Dialyzer
Diffstat (limited to 'lib/dialyzer/src/dialyzer.erl')
-rw-r--r--lib/dialyzer/src/dialyzer.erl16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index 5014a4244c..acbe574e2b 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -443,22 +443,18 @@ message_to_string({race_condition, [M, F, Args, Reason]}) ->
io_lib:format("The call ~w:~w~s ~s\n", [M, F, Args, Reason]);
%%----- Warnings for behaviour errors --------------------
message_to_string({callback_type_mismatch, [B, F, A, O]}) ->
- io_lib:format("The inferred return type of the ~w/~w callback includes the"
- " type ~s which is not a valid return for the ~w behaviour\n",
+ io_lib:format("The inferred return type for ~w/~w is ~s which is not valid"
+ " return for the callback of the ~w behaviour\n",
[F, A, erl_types:t_to_string(O), B]);
message_to_string({callback_arg_type_mismatch, [B, F, A, N, O]}) ->
- io_lib:format("The inferred type of the ~s argument of ~w/~w callback"
- " includes the type ~s which is not valid for the ~w behaviour"
+ io_lib:format("The inferred type for the ~s argument of ~w/~w is ~s which is"
+ " not valid for the callback of the ~w behaviour"
"\n", [ordinal(N), F, A, erl_types:t_to_string(O), B]);
message_to_string({callback_missing, [B, F, A]}) ->
io_lib:format("Undefined callback function ~w/~w (behaviour '~w')\n",
[F, A, B]);
-message_to_string({invalid_spec, [B, F, A, R]}) ->
- io_lib:format("The spec for the ~w:~w/~w callback is not correct: ~s\n",
- [B, F, A, R]);
-message_to_string({spec_missing, [B, F, A]}) ->
- io_lib:format("Type info about ~w:~w/~w callback is not available\n",
- [B, F, A]).
+message_to_string({callback_info_missing, [B]}) ->
+ io_lib:format("Callback info about the ~w behaviour is not available\n", [B]).
%%-----------------------------------------------------------------------------
%% Auxiliary functions below