aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-25 13:53:00 +0100
committerBjörn Gustavsson <[email protected]>2011-11-25 13:53:00 +0100
commit2b36dd726551cf822041b065df5d753ed0dba8b1 (patch)
treea421d7fcbcfca43200c64c29cfb801a56c61847a
parentfa8edf9882b0b1213018a8421f7c779be3001abc (diff)
parentf5b7411b6f3ea3a79d7998b59c5610fa795d556a (diff)
downloadotp-2b36dd726551cf822041b065df5d753ed0dba8b1.tar.gz
otp-2b36dd726551cf822041b065df5d753ed0dba8b1.tar.bz2
otp-2b36dd726551cf822041b065df5d753ed0dba8b1.zip
Merge branch 'bjorn/external-funs/OTP-9643'
* bjorn/external-funs/OTP-9643: sys_expand_pmod: Handle external funs in parameterized modules
-rw-r--r--lib/compiler/src/sys_expand_pmod.erl2
-rw-r--r--lib/compiler/test/pmod_SUITE.erl1
-rw-r--r--lib/compiler/test/pmod_SUITE_data/pmod_basic.erl4
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/compiler/src/sys_expand_pmod.erl b/lib/compiler/src/sys_expand_pmod.erl
index 4fee26f2a6..4576dfbf12 100644
--- a/lib/compiler/src/sys_expand_pmod.erl
+++ b/lib/compiler/src/sys_expand_pmod.erl
@@ -317,6 +317,8 @@ expr({'try',Line,Es0,Scs0,Ccs0,As0},St) ->
Ccs1 = icr_clauses(Ccs0,St),
As1 = exprs(As0,St),
{'try',Line,Es1,Scs1,Ccs1,As1};
+expr({'fun',_,{function,_,_,_}}=ExtFun,_St) ->
+ ExtFun;
expr({'fun',Line,Body,Info},St) ->
case Body of
{clauses,Cs0} ->
diff --git a/lib/compiler/test/pmod_SUITE.erl b/lib/compiler/test/pmod_SUITE.erl
index 3d02adaf52..5dd09a7245 100644
--- a/lib/compiler/test/pmod_SUITE.erl
+++ b/lib/compiler/test/pmod_SUITE.erl
@@ -100,6 +100,7 @@ basic_1(Config, Opts) ->
Fun = fun(Arg) -> Prop4:bar(Arg) end,
?line ok = Fun({s,0}),
+ [{y,[1,2]},{x,[5,19]}] = Prop4:collapse([{y,[2,1]},{x,[19,5]}]),
ok.
otp_8447(Config) when is_list(Config) ->
diff --git a/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl b/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl
index 0d46cffe00..c6aa2d4655 100644
--- a/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl
+++ b/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl
@@ -21,6 +21,7 @@
-export([lookup/1,or_props/1,prepend/1,append/1,stupid_sum/0]).
-export([bar/1,bar_bar/1]).
-export([bc1/0, bc2/0]).
+-export([collapse/1]).
lookup(Key) ->
proplists:lookup(Key, Props).
@@ -77,3 +78,6 @@ bc1() ->
bc2() ->
<< <<A:1>> || A <- [1,0,1,0] >>.
+
+collapse(L) ->
+ lists:keymap(fun lists:sort/1, 2, L).