diff options
author | Stavros Aronis <[email protected]> | 2011-03-06 00:01:59 +0200 |
---|---|---|
committer | Niclas Axelsson <[email protected]> | 2011-03-11 12:03:53 +0100 |
commit | 31ffea630ffd73d39970c3def796b00dd782373d (patch) | |
tree | f739f98a069f7525a7264fdacd9eac5a24f8add8 /lib/dialyzer/src/dialyzer.erl | |
parent | 8148d9a6e19e54e4f6769062ee4e01c8291f4fbf (diff) | |
download | otp-31ffea630ffd73d39970c3def796b00dd782373d.tar.gz otp-31ffea630ffd73d39970c3def796b00dd782373d.tar.bz2 otp-31ffea630ffd73d39970c3def796b00dd782373d.zip |
Generate better warnings for failing guards
Diffstat (limited to 'lib/dialyzer/src/dialyzer.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl index dde0c17c39..3e7680f4bb 100644 --- a/lib/dialyzer/src/dialyzer.erl +++ b/lib/dialyzer/src/dialyzer.erl @@ -334,6 +334,9 @@ message_to_string({guard_fail, []}) -> "Clause guard cannot succeed.\n"; message_to_string({guard_fail, [Arg1, Infix, Arg2]}) -> io_lib:format("Guard test ~s ~s ~s can never succeed\n", [Arg1, Infix, Arg2]); +message_to_string({neg_guard_fail, [Arg1, Infix, Arg2]}) -> + io_lib:format("Guard test not(~s ~s ~s) can never succeed\n", + [Arg1, Infix, Arg2]); message_to_string({guard_fail, [Guard, Args]}) -> io_lib:format("Guard test ~w~s can never succeed\n", [Guard, Args]); message_to_string({neg_guard_fail, [Guard, Args]}) -> |