aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer.erl
diff options
context:
space:
mode:
authorStavros Aronis <aronisstav@gmail.com>2011-03-08 15:28:09 +0200
committerNiclas Axelsson <burbas@erlang.org>2011-03-11 12:03:53 +0100
commitf01ef637c938cf3cf295eb3ae1d579516723ee80 (patch)
treeff7eb50375461f33d638630a0c41de4d9e02efde /lib/dialyzer/src/dialyzer.erl
parent8342fcf5395133a19d647f2ace606af9b7fc1732 (diff)
downloadotp-f01ef637c938cf3cf295eb3ae1d579516723ee80.tar.gz
otp-f01ef637c938cf3cf295eb3ae1d579516723ee80.tar.bz2
otp-f01ef637c938cf3cf295eb3ae1d579516723ee80.zip
More descriptive warning when a tuple pattern matches a typed record
Diffstat (limited to 'lib/dialyzer/src/dialyzer.erl')
-rw-r--r--lib/dialyzer/src/dialyzer.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index 683b518831..5014a4244c 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -368,6 +368,9 @@ message_to_string({record_constr, [Name, Field, Type]}) ->
message_to_string({record_matching, [String, Name]}) ->
io_lib:format("The ~s violates the"
" declared type for #~w{}\n", [String, Name]);
+message_to_string({record_match, [Pat, Type]}) ->
+ io_lib:format("Matching of ~s tagged with a record name violates the declared"
+ " type of ~s\n", [Pat, Type]);
message_to_string({pattern_match, [Pat, Type]}) ->
io_lib:format("The ~s can never match the type ~s\n", [Pat, Type]);
message_to_string({pattern_match_cov, [Pat, Type]}) ->