aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/results/literals
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-05-13 08:31:19 +0200
committerHans Bolinder <[email protected]>2014-06-17 12:32:51 +0200
commit8498a35ce141c6e16feed198540b910b9475b2e2 (patch)
tree1f460c322886ce3f949fedfc753c59bd5973d5c2 /lib/dialyzer/test/small_SUITE_data/results/literals
parente2961080386045f3e4ef59d9895b680ccdc4fbe4 (diff)
downloadotp-8498a35ce141c6e16feed198540b910b9475b2e2.tar.gz
otp-8498a35ce141c6e16feed198540b910b9475b2e2.tar.bz2
otp-8498a35ce141c6e16feed198540b910b9475b2e2.zip
[dialyzer] Fix handling of literal records
This ticket is about records in Erlang code, and when to check the fields against the (optional) types given when defining records. Dialyzer operates on the Erlang Core format, where there are no trace of records. The fix implemented is a Real Hack: Given the new option 'dialyzer' erl_expand_records marks the line number of records in a way that is undone by v3_core, which in turn inserts annotations that can be recognized by Dialyzer.
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/results/literals')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/literals14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/literals b/lib/dialyzer/test/small_SUITE_data/results/literals
new file mode 100644
index 0000000000..03e161ca71
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/literals
@@ -0,0 +1,14 @@
+
+literals.erl:11: Function t1/0 has no local return
+literals.erl:12: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:14: Function t2/0 has no local return
+literals.erl:15: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:17: Function t3/0 has no local return
+literals.erl:18: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:21: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:23: Function m1/1 has no local return
+literals.erl:23: Matching of pattern {'r', 'a'} tagged with a record name violates the declared type of #r{id::'integer' | 'undefined'}
+literals.erl:26: Function m2/1 has no local return
+literals.erl:26: Matching of pattern {'r', 'a'} tagged with a record name violates the declared type of #r{id::'integer' | 'undefined'}
+literals.erl:29: Function m3/1 has no local return
+literals.erl:29: The pattern {{'r', 'a'}} can never match the type any()