aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/v3_core.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-09-27 15:29:52 +0200
committerBjörn Gustavsson <[email protected]>2014-10-27 12:28:28 +0100
commit9430e6e0223f8d9ae592f8062a50285d23becd5a (patch)
tree2397f63f7638b5354872feebf93bf4ff3db1d5f7 /lib/compiler/src/v3_core.erl
parent2397a14d1113bc2d334dee908269cf3b63c46314 (diff)
downloadotp-9430e6e0223f8d9ae592f8062a50285d23becd5a.tar.gz
otp-9430e6e0223f8d9ae592f8062a50285d23becd5a.tar.bz2
otp-9430e6e0223f8d9ae592f8062a50285d23becd5a.zip
Fix miscompilation when module contains multiple named funs
A module containing two named funs bearing the same name and arity could be miscompiled. Reported-by: Sam Chapin
Diffstat (limited to 'lib/compiler/src/v3_core.erl')
-rw-r--r--lib/compiler/src/v3_core.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 83cf76f241..caf5298d38 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -647,8 +647,8 @@ expr({'fun',L,{clauses,Cs},Id}, St) ->
fun_tq(Id, Cs, L, St, unnamed);
expr({named_fun,L,'_',Cs,Id}, St) ->
fun_tq(Id, Cs, L, St, unnamed);
-expr({named_fun,L,Name,Cs,{Index,Uniq,_Fname}}, St) ->
- fun_tq({Index,Uniq,Name}, Cs, L, St, {named, Name});
+expr({named_fun,L,Name,Cs,Id}, St) ->
+ fun_tq(Id, Cs, L, St, {named,Name});
expr({call,L,{remote,_,M,F},As0}, #core{wanted=Wanted}=St0) ->
{[M1,F1|As1],Aps,St1} = safe_list([M,F|As0], St0),
Lanno = lineno_anno(L, St1),