summaryrefslogtreecommitdiff
path: root/lib/dialyzer/test/small_SUITE_data/src/fun_named.erl
blob: 4c74f092fa9bb18e38b4e06e5930294f21541c7f (plain)
1
2
3
4
5
6
7
8
9
10
%% Analysis could enter an infinite loop when a named fun called itself.
-module(fun_hangs).
-export([bar/1, foo/0]).

-spec bar(fun((pos_integer()) -> term())) -> term().
bar(Fun) ->
  Fun.

foo() ->
    bar(fun F(_) -> F(1) end).