aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/maps1.erl
AgeCommit message (Collapse)Author
2016-04-28erl_types: Add a map type representationMagnus Lång
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.
2016-01-14dialyzer: Update Maps testsBjörn-Egil Dahlberg
2014-01-29dialyzer: Add maps testsBjörn-Egil Dahlberg