diff options
author | Patrik Nyblom <[email protected]> | 2010-05-21 12:02:04 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-06-02 16:44:50 +0200 |
commit | a4894eabd2117dbb8e98365e9f87acf8c7a1ae33 (patch) | |
tree | fca9e53889a4907ac4e62e7d04bc2fd36906f869 /lib/compiler/src/sys_pre_expand.erl | |
parent | c48e315dbc8e41217ef51501afef30d02b7690ce (diff) | |
download | otp-a4894eabd2117dbb8e98365e9f87acf8c7a1ae33.tar.gz otp-a4894eabd2117dbb8e98365e9f87acf8c7a1ae33.tar.bz2 otp-a4894eabd2117dbb8e98365e9f87acf8c7a1ae33.zip |
Teach compiler to override autoimport with import
Diffstat (limited to 'lib/compiler/src/sys_pre_expand.erl')
-rw-r--r-- | lib/compiler/src/sys_pre_expand.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/compiler/src/sys_pre_expand.erl b/lib/compiler/src/sys_pre_expand.erl index 590b8b07d8..480954adac 100644 --- a/lib/compiler/src/sys_pre_expand.erl +++ b/lib/compiler/src/sys_pre_expand.erl @@ -407,14 +407,14 @@ expr({call,Line,{atom,La,N}=Atom,As0}, St0) -> true -> {{call,Line,Atom,As},St1}; _ -> - case erl_internal:bif(N, Ar) of - true -> - {{call,Line,{remote,La,{atom,La,erlang},Atom},As},St1}; - false -> - case imported(N, Ar, St1) of - {yes,Mod} -> - {{call,Line,{remote,La,{atom,La,Mod},Atom},As},St1}; - no -> % Let the error come later, this call is to an undefined function... + case imported(N, Ar, St1) of + {yes,Mod} -> + {{call,Line,{remote,La,{atom,La,Mod},Atom},As},St1}; + no -> + case erl_internal:bif(N, Ar) of + true -> + {{call,Line,{remote,La,{atom,La,erlang},Atom},As},St1}; + false -> %% This should have been handled by erl_lint {{call,Line,Atom,As},St1} end end |