aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-11-17 16:08:40 +0100
committerBjörn Gustavsson <[email protected]>2014-11-17 16:08:40 +0100
commitdad49788a71fa6d7ea5d0515e87d87f9e68debe5 (patch)
tree7c3ca50067c8c43cb5c3465e00f101ff34b8c66e /lib/compiler/test
parente61f384adff0c9b134750ee239581296d25c10cd (diff)
parent9430e6e0223f8d9ae592f8062a50285d23becd5a (diff)
downloadotp-dad49788a71fa6d7ea5d0515e87d87f9e68debe5.tar.gz
otp-dad49788a71fa6d7ea5d0515e87d87f9e68debe5.tar.bz2
otp-dad49788a71fa6d7ea5d0515e87d87f9e68debe5.zip
Merge branch 'nox/compiler/eep37-duplicate-names/OTP-12262' into maint
* nox/compiler/eep37-duplicate-names/OTP-12262: Fix miscompilation when module contains multiple named funs
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/fun_SUITE.erl19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/compiler/test/fun_SUITE.erl b/lib/compiler/test/fun_SUITE.erl
index 25b7f677b5..a3e9b7fe4e 100644
--- a/lib/compiler/test/fun_SUITE.erl
+++ b/lib/compiler/test/fun_SUITE.erl
@@ -21,10 +21,10 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
test1/1,overwritten_fun/1,otp_7202/1,bif_fun/1,
- external/1,eep37/1,badarity/1]).
+ external/1,eep37/1,eep37_dup/1,badarity/1]).
-%% Internal export.
--export([call_me/1]).
+%% Internal exports.
+-export([call_me/1,dup1/0,dup2/0]).
-include_lib("test_server/include/test_server.hrl").
@@ -32,7 +32,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [test1,overwritten_fun,otp_7202,bif_fun,external,eep37,badarity].
+ [test1,overwritten_fun,otp_7202,bif_fun,external,eep37,eep37_dup,badarity].
groups() ->
[].
@@ -206,6 +206,17 @@ eep37(Config) when is_list(Config) ->
50 = UnusedName(8),
ok.
+eep37_dup(Config) when is_list(Config) ->
+ dup1 = (dup1())(),
+ dup2 = (dup2())(),
+ ok.
+
+dup1() ->
+ fun _F() -> dup1 end.
+
+dup2() ->
+ fun _F() -> dup2 end.
+
badarity(Config) when is_list(Config) ->
{'EXIT',{{badarity,{_,[]}},_}} = (catch (fun badarity/1)()),
ok.