From f5b7411b6f3ea3a79d7998b59c5610fa795d556a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 24 Nov 2011 09:17:26 +0100 Subject: sys_expand_pmod: Handle external funs in parameterized modules Starting in ff432e262e65243cbc983fcb002527f8fae8c78b, sys_pre_expand passes external funs through to the downstream passes. It used to translate external funs to a call to erlang:make_fun/3. Therefore, we will now need to handle external funs in sys_expand_pmod. Noticed-by: Stavros Aronis --- lib/compiler/src/sys_expand_pmod.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/compiler/src') 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} -> -- cgit v1.2.3