aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2012-11-05 17:04:07 +0100
committerFredrik Gustafsson <[email protected]>2013-01-16 15:05:42 +0100
commit7b0b3688ba8b921b8cc1eff39ed39a14c424d557 (patch)
treeae31c6aba28aeaa5ef67b33100fe492590e9e32c /lib/compiler/test
parent572d66b1e4a5d5e519f89881a18bdf4f2745f62c (diff)
downloadotp-7b0b3688ba8b921b8cc1eff39ed39a14c424d557.tar.gz
otp-7b0b3688ba8b921b8cc1eff39ed39a14c424d557.tar.bz2
otp-7b0b3688ba8b921b8cc1eff39ed39a14c424d557.zip
Raise a function_clause error with the right arguments when inlining
The inlined lists functions raised an error with only the list instead of all their given arguments.
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/inline_SUITE.erl48
1 files changed, 28 insertions, 20 deletions
diff --git a/lib/compiler/test/inline_SUITE.erl b/lib/compiler/test/inline_SUITE.erl
index 63180c3f95..e7bb552edb 100644
--- a/lib/compiler/test/inline_SUITE.erl
+++ b/lib/compiler/test/inline_SUITE.erl
@@ -256,38 +256,46 @@ lists(Config) when is_list(Config) ->
%% Cleanup.
erase(?MODULE),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,not_a_list],_}|_]}} =
(catch lists:map(fun (X) -> X end, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,not_a_list],_}|_]}} =
(catch lists:flatmap(fun (X) -> X end, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,not_a_list],_}|_]}} =
(catch lists:foreach(fun (X) -> X end, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,not_a_list],_}|_]}} =
(catch lists:filter(fun (_) -> true end, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,not_a_list],_}|_]}} =
(catch lists:any(fun (_) -> false end, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,not_a_list],_}|_]}} =
(catch lists:all(fun (_) -> true end, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,acc,not_a_list],_}|_]}} =
(catch lists:foldl(fun (X, Acc) -> {X,Acc} end, acc, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,acc,not_a_list],_}|_]}} =
(catch lists:foldr(fun (X, Acc) -> {X,Acc} end, acc, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,acc,not_a_list],_}|_]}} =
(catch lists:mapfoldl(fun (X, Acc) -> {X,Acc} end, acc, not_a_list)),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[_,acc,not_a_list],_}|_]}} =
(catch lists:mapfoldr(fun (X, Acc) -> {X,Acc} end, acc, not_a_list)),
- {'EXIT',{function_clause,_}} = (catch lists:map(not_a_function, [])),
- {'EXIT',{function_clause,_}} = (catch lists:flatmap(not_a_function, [])),
- {'EXIT',{function_clause,_}} = (catch lists:foreach(not_a_function, [])),
- {'EXIT',{function_clause,_}} = (catch lists:filter(not_a_function, [])),
- {'EXIT',{function_clause,_}} = (catch lists:any(not_a_function, [])),
- {'EXIT',{function_clause,_}} = (catch lists:all(not_a_function, [])),
- {'EXIT',{function_clause,_}} = (catch lists:foldl(not_a_function, acc, [])),
- {'EXIT',{function_clause,_}} = (catch lists:foldr(not_a_function, acc, [])),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,[]],_}|_]}} =
+ (catch lists:map(not_a_function, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,[]],_}|_]}} =
+ (catch lists:flatmap(not_a_function, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,[]],_}|_]}} =
+ (catch lists:foreach(not_a_function, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,[]],_}|_]}} =
+ (catch lists:filter(not_a_function, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,[]],_}|_]}} =
+ (catch lists:any(not_a_function, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,[]],_}|_]}} =
+ (catch lists:all(not_a_function, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,acc,[]],_}|_]}} =
+ (catch lists:foldl(not_a_function, acc, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,acc,[]],_}|_]}} =
+ (catch lists:foldr(not_a_function, acc, [])),
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,acc,[]],_}|_]}} =
(catch lists:mapfoldl(not_a_function, acc, [])),
- {'EXIT',{function_clause,_}} =
+ {'EXIT',{function_clause,[{?MODULE,_,[not_a_function,acc,[]],_}|_]}} =
(catch lists:mapfoldr(not_a_function, acc, [])),
ok.