aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/contract2.erl
blob: 211de7f0093598278f13f3805323b04eb5e80c8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-module(contract2).
-export([test/2]).

-spec test(list(), list()) -> ok.

test([], []) ->
  ok;
test([], L) ->
  raise(L);
test([H|T], L) ->
  case H of
    true -> test(T, L);
    false -> test(T, [H|L])
  end.

-spec raise(_) -> no_return().
raise(X) ->
  throw(X).