diff options
author | Anthony Ramine <[email protected]> | 2013-05-18 21:02:22 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2013-11-11 15:44:56 +0100 |
commit | 290dc2b08a2f92157ac5358fba815f4dbb32f8f2 (patch) | |
tree | 9382c0847500f33e38dea044ddd2b2d8266b895b /lib | |
parent | a2d97b6405066c702678e891d0d3c7640b81d621 (diff) | |
download | otp-290dc2b08a2f92157ac5358fba815f4dbb32f8f2.tar.gz otp-290dc2b08a2f92157ac5358fba815f4dbb32f8f2.tar.bz2 otp-290dc2b08a2f92157ac5358fba815f4dbb32f8f2.zip |
Fix reverting of implicit funs
Implicit funs parts in plain AST are no longer in concrete form since
Erlang/OTP R15.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/syntax_tools/src/erl_syntax.erl | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl index bdb2b5bcd7..409805e95f 100644 --- a/lib/syntax_tools/src/erl_syntax.erl +++ b/lib/syntax_tools/src/erl_syntax.erl @@ -5485,22 +5485,15 @@ revert_implicit_fun(Node) -> arity_qualifier -> F = arity_qualifier_body(Name), A = arity_qualifier_argument(Name), - case {type(F), type(A)} of - {atom, integer} -> - {'fun', Pos, - {function, concrete(F), concrete(A)}}; - _ -> - Node - end; + {'fun', Pos, {function, F, A}}; module_qualifier -> M = module_qualifier_argument(Name), Name1 = module_qualifier_body(Name), - F = arity_qualifier_body(Name1), - A = arity_qualifier_argument(Name1), - case {type(M), type(F), type(A)} of - {atom, atom, integer} -> - {'fun', Pos, - {function, concrete(M), concrete(F), concrete(A)}}; + case type(Name1) of + arity_qualifier -> + F = arity_qualifier_body(Name1), + A = arity_qualifier_argument(Name1), + {'fun', Pos, {function, M, F, A}}; _ -> Node end; |