summaryrefslogtreecommitdiff
path: root/lib/dialyzer/test/small_SUITE_data/results/maps1
diff options
context:
space:
mode:
authorMagnus Lång <margnus1@telia.com>2016-02-27 17:56:22 +0100
committerHans Bolinder <hasse@erlang.org>2016-04-28 16:14:24 +0200
commit252df5612032cfba71285b5886937e88ba176529 (patch)
treef44ae2d8b8259865111cc47807b18289e096235a /lib/dialyzer/test/small_SUITE_data/results/maps1
parentac2f1c71d5b5169d49a5cd5fd73d28a702a58024 (diff)
downloaderlang-252df5612032cfba71285b5886937e88ba176529.tar.gz
erl_types: Add a map type representation
The type of a map is represented as a three-tuple {Pairs, DefaultKey, DefaultValue}. DefaultKey and DefaultValue are types. Pairs is a list of three-tuples {Key, mandatory | optional, Value}, where Key and Value are types. All types Key must be singleton, or "known at compile time," as the EEP put it. Examples: #{integer()=>list()} {[], integer(), list()} #{a=>char(), b=>atom()} {[{a, optional, char()}, {b, optional, atom()}], none(), none()} map() {[], any(), any()} A more formal description of the representation and its invariants can be found in erl_types.erl Special thanks to Daniel S. McCain (@dsmccain) that co-authored a very early version of this with me back in April 2014, although only the singleton type logic remains from that version.
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/results/maps1')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/maps16
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/maps1 b/lib/dialyzer/test/small_SUITE_data/results/maps1
index e88c91f21f..773f037c47 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/maps1
+++ b/lib/dialyzer/test/small_SUITE_data/results/maps1
@@ -1,4 +1,8 @@
+maps1.erl:20: Function recv/3 has no local return
+maps1.erl:25: Function decode/1 has no local return
+maps1.erl:31: Function t1/0 has no local return
+maps1.erl:40: Function update/2 has no local return
maps1.erl:43: Function t3/0 has no local return
-maps1.erl:44: The call maps1:foo(~{'greger'=>3, ~{'arne'=>'anka'}~=>45}~,1) will never return since it differs in the 2nd argument from the success typing arguments: (#{},'b')
+maps1.erl:46: Function foo/2 has no local return
maps1.erl:52: The call Mod:'function'(~{'literal'=>'map'}~,'another_arg') requires that Mod is of type atom() not #{}