aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/examples/erl_id_trans.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-11-07 16:13:30 +0100
committerMicael Karlberg <[email protected]>2011-11-07 16:13:30 +0100
commit8149b970814848dc404767d5635529c61cf20b24 (patch)
treeb829c0cf811b6f230653b75433d01657017c62c7 /lib/stdlib/examples/erl_id_trans.erl
parent55ae4936f1afabc4475139d7d46d655b61e06b3b (diff)
parent2c18949bf1edfda523ae15229e94a8400bb1870c (diff)
downloadotp-8149b970814848dc404767d5635529c61cf20b24.tar.gz
otp-8149b970814848dc404767d5635529c61cf20b24.tar.bz2
otp-8149b970814848dc404767d5635529c61cf20b24.zip
Merge branch 'master' of super:otp into bmk/megaco/r15_integration
Diffstat (limited to 'lib/stdlib/examples/erl_id_trans.erl')
-rw-r--r--lib/stdlib/examples/erl_id_trans.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/stdlib/examples/erl_id_trans.erl b/lib/stdlib/examples/erl_id_trans.erl
index b63acdd40a..72e41d6473 100644
--- a/lib/stdlib/examples/erl_id_trans.erl
+++ b/lib/stdlib/examples/erl_id_trans.erl
@@ -419,7 +419,14 @@ expr({'fun',Line,Body}) ->
{'fun',Line,{clauses,Cs1}};
{function,F,A} ->
{'fun',Line,{function,F,A}};
- {function,M,F,A} -> %R10B-6: fun M:F/A.
+ {function,M,F,A} when is_atom(M), is_atom(F), is_integer(A) ->
+ %% R10B-6: fun M:F/A. (Backward compatibility)
+ {'fun',Line,{function,M,F,A}};
+ {function,M0,F0,A0} ->
+ %% R15: fun M:F/A with variables.
+ M = expr(M0),
+ F = expr(F0),
+ A = expr(A0),
{'fun',Line,{function,M,F,A}}
end;
expr({call,Line,F0,As0}) ->