summaryrefslogtreecommitdiff
path: root/lib/compiler/test/compilation_SUITE_data/infinite_loop.erl
blob: 6d9135bb0109691d3153a91c3062066bc45cb3f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-module(infinite_loop).
-compile([export_all]).

?MODULE() ->
    ok.

%% When a series of calls initiated by a fun went into an infinite loop,
%% the compiler went into an infinite loop too.
foo() ->
    fun bar/0().

bar() ->
    baz().

baz() ->
    bar().

foobar() ->
    fun barfoo/0().

barfoo() ->
    barfoo().