aboutsummaryrefslogblamecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/no_unused_fun2.erl
blob: e287c4de5f1a20291336ea046d6cf07f6a1b544d (plain) (tree)



















                              
-module(no_unused_fun2).
-export([main/2]).

main(X, Bool) ->
  case Bool of
    true ->
      F = fun foo/1;
    false ->
      F = fun foobar/1
  end,
  spawn(fun()->calc(X, F)end).

calc(X, Fun) ->
  Fun(X).

foo(A) ->
  A+42.

foobar(A) ->
  A-42.