diff options
author | Hans Bolinder <[email protected]> | 2017-09-01 11:44:36 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2017-09-12 13:32:29 +0200 |
commit | 3d05725ceb26611ac8c19cc01df715089dc322d5 (patch) | |
tree | eeae656118cbb70744af4388cf9575b1c0cad481 /lib/dialyzer/test/map_SUITE_data/results/opaque_key | |
parent | c3f50bc462cc850bdef6b77d1a7a58091a75c936 (diff) | |
download | otp-3d05725ceb26611ac8c19cc01df715089dc322d5.tar.gz otp-3d05725ceb26611ac8c19cc01df715089dc322d5.tar.bz2 otp-3d05725ceb26611ac8c19cc01df715089dc322d5.zip |
dialyzer: Modify handling of singleton map key types
The test case loop.erl shows that there is a problem with certain
singleton key types. Here the internal representation toggles between
#{a | b => ...} and #{a => ..., b => ...}
The choice is to turn #{a | b => ...} into #{a => ..., b => ...} early
(t_from_form()). The aim is to keep as much info as possible (in
pairs). However, including complex singleton keys (tuples, maps) in
this scheme is potentially too costly, and a bit complicated. So one
more choice is made: let atoms and number (and nothing else) be
singleton types, and let complex keys go into the default key.
Diffstat (limited to 'lib/dialyzer/test/map_SUITE_data/results/opaque_key')
-rw-r--r-- | lib/dialyzer/test/map_SUITE_data/results/opaque_key | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/dialyzer/test/map_SUITE_data/results/opaque_key b/lib/dialyzer/test/map_SUITE_data/results/opaque_key index 2ae0e0c5c6..8d6379b5e0 100644 --- a/lib/dialyzer/test/map_SUITE_data/results/opaque_key +++ b/lib/dialyzer/test/map_SUITE_data/results/opaque_key @@ -1,4 +1,5 @@ +opaque_key_adt.erl:35: Invalid type specification for function opaque_key_adt:s2/0. The success typing is () -> #{3:='a'} opaque_key_adt.erl:41: Invalid type specification for function opaque_key_adt:s4/0. The success typing is () -> #{1:='a'} opaque_key_adt.erl:44: Invalid type specification for function opaque_key_adt:s5/0. The success typing is () -> #{2:=3} opaque_key_adt.erl:56: Invalid type specification for function opaque_key_adt:smt1/0. The success typing is () -> #{3:='a'} |