blob: 945b2a9144cd81a8bcb118efde6c83af3c0dd107 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.
|