diff options
author | Hans Bolinder <[email protected]> | 2015-02-12 16:33:57 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-02-12 16:33:57 +0100 |
commit | 91cde7fe31b1542fed786d5427dff3d2d0d5421c (patch) | |
tree | fe5070f760ae5f7898187f01f312c1604a362890 /lib/dialyzer/test/small_SUITE_data | |
parent | 73996f6dabd8c90164da129ad5ac54293b3e4243 (diff) | |
parent | 3d6b7efcd7af5347def17c751cc9d411e58d82d1 (diff) | |
download | otp-91cde7fe31b1542fed786d5427dff3d2d0d5421c.tar.gz otp-91cde7fe31b1542fed786d5427dff3d2d0d5421c.tar.bz2 otp-91cde7fe31b1542fed786d5427dff3d2d0d5421c.zip |
[dialyzer] Fix a bug concerning map() types
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl b/lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl new file mode 100644 index 0000000000..945b2a9144 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl @@ -0,0 +1,23 @@ +%% In 17, the linter says that map(A) redefines 'type map', which is +%% allowed until next release. However, Dialyzer used to replace +%% map(A) with #{}, which resulted in warnings. + +-module(maps_redef2). + +-export([t/0]). + +-type map(_A) :: integer(). + +t() -> + M = new(), + t1(M). + +-spec t1(map(_)) -> map(_). + +t1(A) -> + A + A. + +-spec new() -> map(_). + +new() -> + 3. |