aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-01-30 15:34:47 +0100
committerBjörn Gustavsson <[email protected]>2014-01-30 15:44:27 +0100
commit4aeef6279f19a15c728befe817d78d669bb5d1fd (patch)
treed9046d545bc2a62e0cf523e7a64f5860a2387029 /lib/compiler/test
parentfdcdaca338849d7f63d4300e489318f6ee275d82 (diff)
downloadotp-4aeef6279f19a15c728befe817d78d669bb5d1fd.tar.gz
otp-4aeef6279f19a15c728befe817d78d669bb5d1fd.tar.bz2
otp-4aeef6279f19a15c728befe817d78d669bb5d1fd.zip
Issue a warning when a named fun is constructed but not used
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/warnings_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl
index 7186956603..16d15a59e5 100644
--- a/lib/compiler/test/warnings_SUITE.erl
+++ b/lib/compiler/test/warnings_SUITE.erl
@@ -390,6 +390,10 @@ effect(Config) when is_list(Config) ->
<<X:8>>;
unused_fun ->
fun() -> {ok,X} end;
+ unused_named_fun ->
+ fun F(0) -> 1;
+ F(N) -> N*F(N-1)
+ end;
unused_atom ->
ignore; %no warning
unused_nil ->
@@ -484,8 +488,9 @@ effect(Config) when is_list(Config) ->
{22,sys_core_fold,{no_effect,{erlang,is_integer,1}}},
{24,sys_core_fold,useless_building},
{26,sys_core_fold,useless_building},
- {32,sys_core_fold,{no_effect,{erlang,'=:=',2}}},
- {34,sys_core_fold,{no_effect,{erlang,get_cookie,0}}}]}}],
+ {28,sys_core_fold,useless_building},
+ {36,sys_core_fold,{no_effect,{erlang,'=:=',2}}},
+ {38,sys_core_fold,{no_effect,{erlang,get_cookie,0}}}]}}],
?line [] = run(Config, Ts),
ok.