diff options
author | Hans Bolinder <[email protected]> | 2019-02-20 15:51:09 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-02-21 07:54:27 +0100 |
commit | b67ddedf0212079204effbb061f31b7366dff95b (patch) | |
tree | b7bf48665230d3269d3aa7c72746234a6b3e835e /lib/dialyzer/test/opaque_SUITE_data/src/para | |
parent | f1a00ba58cbfa899d4de2a63b1dbb9a16a9f50ed (diff) | |
download | otp-b67ddedf0212079204effbb061f31b7366dff95b.tar.gz otp-b67ddedf0212079204effbb061f31b7366dff95b.tar.bz2 otp-b67ddedf0212079204effbb061f31b7366dff95b.zip |
dialyzer: Fix maps as parameter of opaque types
The clause added for maps in commit 1a7c41be is corrected.
Diffstat (limited to 'lib/dialyzer/test/opaque_SUITE_data/src/para')
-rw-r--r-- | lib/dialyzer/test/opaque_SUITE_data/src/para/para4.erl | 11 | ||||
-rw-r--r-- | lib/dialyzer/test/opaque_SUITE_data/src/para/para4_adt.erl | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para4.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para4.erl index b9794672a9..8cd049169d 100644 --- a/lib/dialyzer/test/opaque_SUITE_data/src/para/para4.erl +++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para4.erl @@ -88,6 +88,11 @@ adt_tt13() -> I2 = adt_tup2(), I1 =:= I2. % opaque attempt +adt_tt14() -> + I1 = adt_map(), + I2 = adt_map2(), + I1 =:= I2. + y3() -> {a, 3}. @@ -132,3 +137,9 @@ adt_tup() -> adt_tup2() -> para4_adt:tup2(). + +adt_map() -> + para4_adt:map(). + +adt_map2() -> + para4_adt:map2(). diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para4_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para4_adt.erl index 407dd198a7..06a6c22677 100644 --- a/lib/dialyzer/test/opaque_SUITE_data/src/para/para4_adt.erl +++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para4_adt.erl @@ -8,6 +8,8 @@ -export([tup/0, tup2/0]). +-export([map/0, map2/0]). + -export_type([t/1, y/1, int/1, tup/1, un/1]). -type ai() :: atom() | integer(). @@ -106,3 +108,13 @@ tup() -> tup2() -> foo:tup2(). + +-spec map() -> t(#{2 => b}). + +map() -> + foo:map(). + +-spec map2() -> t(#{1 => a}). + +map2() -> + foo:map2(). |