aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/map_SUITE_data/results/typeflow2
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2016-02-28 00:17:48 +0100
committerHans Bolinder <[email protected]>2016-04-28 16:16:09 +0200
commitebd967522612333e52a884181e6132b1ba7e5239 (patch)
treecd12d37cd4fe9d375cf15acbad8d08e5a4542af5 /lib/dialyzer/test/map_SUITE_data/results/typeflow2
parente3ac51b173585f84c397ae38c27d772be2d308c6 (diff)
downloadotp-ebd967522612333e52a884181e6132b1ba7e5239.tar.gz
otp-ebd967522612333e52a884181e6132b1ba7e5239.tar.bz2
otp-ebd967522612333e52a884181e6132b1ba7e5239.zip
dialyzer: Unfold cerl patterns containing maps
Dialyzer relies heavily on the assumption that the type of a literal that is used as a pattern is the type of any value that can match that pattern. For maps, that is not true, and it was causing bad analysis results. A new help function dialyzer_utils:refold_pattern/1 identifies maps in literal patterns, and unfolds and labels them, allowing them to be properly analysed.
Diffstat (limited to 'lib/dialyzer/test/map_SUITE_data/results/typeflow2')
-rw-r--r--lib/dialyzer/test/map_SUITE_data/results/typeflow24
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/dialyzer/test/map_SUITE_data/results/typeflow2 b/lib/dialyzer/test/map_SUITE_data/results/typeflow2
index aa47845fb1..3bce165275 100644
--- a/lib/dialyzer/test/map_SUITE_data/results/typeflow2
+++ b/lib/dialyzer/test/map_SUITE_data/results/typeflow2
@@ -5,11 +5,9 @@ typeflow2.erl:26: Function t2/1 has no local return
typeflow2.erl:29: The call lists:sort(integer()) will never return since it differs in the 1st argument from the success typing arguments: ([any()])
typeflow2.erl:42: The pattern ~{'a':=X}~ can never match since previous clauses completely covered the type #{'a':=integer()}
typeflow2.erl:43: The variable _ can never match since previous clauses completely covered the type #{'a':=integer()}
-typeflow2.erl:48: The pattern ~{}~ can never match the type #{'a':=atom() | maybe_improper_list() | integer()}
+typeflow2.erl:48: The pattern ~{}~ can never match since previous clauses completely covered the type #{'a':=atom() | maybe_improper_list() | integer()}
typeflow2.erl:58: The pattern ~{'a':=X}~ can never match the type #{'a'=>none(), _=>maybe_improper_list() | integer()}
typeflow2.erl:59: The pattern ~{'a':=X}~ can never match the type #{'a'=>none(), _=>maybe_improper_list() | integer()}
typeflow2.erl:60: The pattern ~{'a':=X}~ can never match the type #{'a'=>none(), _=>maybe_improper_list() | integer()}
-typeflow2.erl:80: The pattern ~{'a':=X}~ can never match the type #{}
-typeflow2.erl:81: The pattern ~{'a':=X}~ can never match the type #{}
typeflow2.erl:82: The pattern ~{'a':=X}~ can never match the type #{}
typeflow2.erl:83: The pattern ~{'a':=X}~ can never match the type #{}