diff options
author | Magnus Lång <[email protected]> | 2016-02-28 00:17:48 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-04-28 16:16:09 +0200 |
commit | ebd967522612333e52a884181e6132b1ba7e5239 (patch) | |
tree | cd12d37cd4fe9d375cf15acbad8d08e5a4542af5 /lib/dialyzer/test/map_SUITE_data/results/typeflow | |
parent | e3ac51b173585f84c397ae38c27d772be2d308c6 (diff) | |
download | otp-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/typeflow')
-rw-r--r-- | lib/dialyzer/test/map_SUITE_data/results/typeflow | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/dialyzer/test/map_SUITE_data/results/typeflow b/lib/dialyzer/test/map_SUITE_data/results/typeflow index c4339e91a0..e3378a24bb 100644 --- a/lib/dialyzer/test/map_SUITE_data/results/typeflow +++ b/lib/dialyzer/test/map_SUITE_data/results/typeflow @@ -1,9 +1,4 @@ -typeflow.erl:12: Function a_is_integer/1 has no local return -typeflow.erl:12: The pattern ~{'a':=X}~ can never match the type #{} typeflow.erl:14: Function t2/1 has no local return -typeflow.erl:15: The call typeflow:a_is_integer(M::#{}) will never return since it differs in the 1st argument from the success typing arguments: (#{'a':=integer(), ...}) -typeflow.erl:19: Function t3/1 has no local return -typeflow.erl:20: The call maps:get('a',M::#{}) will never return since the success typing arguments are (any(),map()) -typeflow.erl:5: Function t1/1 has no local return -typeflow.erl:6: The call typeflow:a_is_integer(M::#{}) will never return since it differs in the 1st argument from the success typing arguments: (#{'a':=integer(), ...}) +typeflow.erl:16: The call lists:sort(integer()) will never return since it differs in the 1st argument from the success typing arguments: ([any()]) +typeflow.erl:9: The variable _ can never match since previous clauses completely covered the type #{'a':=integer(), ...} |