aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/maybe_improper.erl
blob: 6d2a35b7c8a8f438b8af076539d1a71b090d85d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
%%%========================================================================
%%% Tests handling of maybe improper lists
%%%========================================================================
-module(maybe_improper).

-export([s/1, t/0]).

-spec s(maybe_improper_list(X,Y)) -> {[X], maybe_improper_list(X,Y)}.
s(L) ->
    lists:split(2, L).

%% Having a remote type in the 'tail' of the list crashed dialyzer.
%% The problem was fixed for R16B03.
-type t_mil() :: maybe_improper_list(integer(), orddict:orddict()).

-spec t() -> t_mil().
t() ->
    [42 | []].