aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/src/erl_syntax.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2013-12-12 23:41:28 +0100
committerMagnus Lidén <[email protected]>2014-01-21 16:49:28 +0100
commit5360e3097fad1f05965d309b672720a864c02e55 (patch)
treedd151ce27229388385f54e6087545163f8cae122 /lib/syntax_tools/src/erl_syntax.erl
parent7042cc483b7e48eeacc99a47676e8593f288285b (diff)
downloadotp-5360e3097fad1f05965d309b672720a864c02e55.tar.gz
otp-5360e3097fad1f05965d309b672720a864c02e55.tar.bz2
otp-5360e3097fad1f05965d309b672720a864c02e55.zip
Fix reverting of local implicit funs in erl_syntax
This partially reverts 290dc2b08a2f92157ac5358fba815f4dbb32f8f2 in which implicit funs were mistakenly thought to be using abstract terms for their name and arity.
Diffstat (limited to 'lib/syntax_tools/src/erl_syntax.erl')
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index 409805e95f..775b2cc109 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -5485,7 +5485,13 @@ revert_implicit_fun(Node) ->
arity_qualifier ->
F = arity_qualifier_body(Name),
A = arity_qualifier_argument(Name),
- {'fun', Pos, {function, F, A}};
+ case {type(F), type(A)} of
+ {atom, integer} ->
+ {'fun', Pos,
+ {function, concrete(F), concrete(A)}};
+ _ ->
+ Node
+ end;
module_qualifier ->
M = module_qualifier_argument(Name),
Name1 = module_qualifier_body(Name),