summaryrefslogtreecommitdiff
path: root/lib/compiler/test/fun_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/test/fun_SUITE.erl')
-rw-r--r--lib/compiler/test/fun_SUITE.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/compiler/test/fun_SUITE.erl b/lib/compiler/test/fun_SUITE.erl
index 3b8e8698de..bd8603ae81 100644
--- a/lib/compiler/test/fun_SUITE.erl
+++ b/lib/compiler/test/fun_SUITE.erl
@@ -206,11 +206,18 @@ external(Config) when is_list(Config) ->
{'EXIT',{{badarity,_},_}} = (catch (id(fun lists:sum/1))(1, 2, 3)),
{'EXIT',{{badarity,_},_}} = (catch apply(fun lists:sum/1, [1,2,3])),
+ {'EXIT',{badarg,_}} = (catch bad_external_fun()),
+
ok.
call_me(I) ->
{ok,I}.
+bad_external_fun() ->
+ V0 = idea,
+ fun V0:V0/V0, %Should fail.
+ never_reached.
+
eep37(Config) when is_list(Config) ->
F = fun Fact(N) when N > 0 -> N * Fact(N - 1); Fact(0) -> 1 end,
Add = fun _(N) -> N + 1 end,