aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-02-22 02:41:06 +0200
committerNiclas Axelsson <[email protected]>2011-03-11 12:03:53 +0100
commit8342fcf5395133a19d647f2ace606af9b7fc1732 (patch)
tree36577d4747e8f8d1e7401409e7e7e293d74f895c /lib/dialyzer/src/dialyzer.erl
parent31ffea630ffd73d39970c3def796b00dd782373d (diff)
downloadotp-8342fcf5395133a19d647f2ace606af9b7fc1732.tar.gz
otp-8342fcf5395133a19d647f2ace606af9b7fc1732.tar.bz2
otp-8342fcf5395133a19d647f2ace606af9b7fc1732.zip
Better blame assignment when a spec is erroneous
Applies to the specification of the return value of a function.
Diffstat (limited to 'lib/dialyzer/src/dialyzer.erl')
-rw-r--r--lib/dialyzer/src/dialyzer.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index 3e7680f4bb..683b518831 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -394,6 +394,10 @@ message_to_string({contract_supertype, [M, F, _A, Contract, Sig]}) ->
io_lib:format("Type specification ~w:~w~s"
" is a supertype of the success typing: ~w:~w~s\n",
[M, F, Contract, M, F, Sig]);
+message_to_string({contract_range, [Contract, M, F, ArgStrings, Line, CRet]}) ->
+ io_lib:format("The contract ~w:~w~s cannot be right because the inferred"
+ " return for ~w~s on line ~w is ~s\n",
+ [M, F, Contract, F, ArgStrings, Line, CRet]);
message_to_string({invalid_contract, [M, F, A, Sig]}) ->
io_lib:format("Invalid type specification for function ~w:~w/~w."
" The success typing is ~s\n", [M, F, A, Sig]);