diff options
author | Björn Gustavsson <[email protected]> | 2011-11-07 14:01:06 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-11-07 14:01:06 +0100 |
commit | d0f1b81f1f0a8955c09d8a626d2d747950c52459 (patch) | |
tree | 6a4c727e7d122cb73ecffd6db8d39d4daf7874df /lib/syntax_tools/src/erl_syntax.erl | |
parent | 2d4f4dca7a511dd61cc99f01bdf2a3dadaef9e5e (diff) | |
parent | ff432e262e65243cbc983fcb002527f8fae8c78b (diff) | |
download | otp-d0f1b81f1f0a8955c09d8a626d2d747950c52459.tar.gz otp-d0f1b81f1f0a8955c09d8a626d2d747950c52459.tar.bz2 otp-d0f1b81f1f0a8955c09d8a626d2d747950c52459.zip |
Merge branch 'bjorn/external-funs/OTP-9643'
* bjorn/external-funs/OTP-9643:
EEP-23: Allow variables in fun M:F/A
Reference manual: Improve the documentation for external funs
Test calling a parameterized module within a fun
beam_loader: Support external funs in the literal pool
Diffstat (limited to 'lib/syntax_tools/src/erl_syntax.erl')
-rw-r--r-- | lib/syntax_tools/src/erl_syntax.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl index 9df5f26454..7f58fda519 100644 --- a/lib/syntax_tools/src/erl_syntax.erl +++ b/lib/syntax_tools/src/erl_syntax.erl @@ -6093,11 +6093,16 @@ implicit_fun_name(Node) -> {'fun', Pos, {function, Atom, Arity}} -> arity_qualifier(set_pos(atom(Atom), Pos), set_pos(integer(Arity), Pos)); - {'fun', Pos, {function, Module, Atom, Arity}} -> + {'fun', Pos, {function, Module, Atom, Arity}} + when is_atom(Module), is_atom(Atom), is_integer(Arity) -> + %% Backward compatibility with pre-R15 abstract format. module_qualifier(set_pos(atom(Module), Pos), arity_qualifier( set_pos(atom(Atom), Pos), set_pos(integer(Arity), Pos))); + {'fun', Pos, {function, Module, Atom, Arity}} -> + %% New in R15: fun M:F/A. + module_qualifier(Module, arity_qualifier(Atom, Arity)); Node1 -> data(Node1) end. |