[erlang-questions] lists:reverse/1 as a built-in function
Tue Jan 16 19:14:48 CET 2007
Thomas Lindgren wrote:
> So, to recapitulate: example_function is locally
> defined and also imported.
> 1. If example_function is explicitly imported (with
> -import), we get a compilation error. (Apparently,
> this is seen as a name clash that can't be resolved.)
> -import(other_m, [g/1]).
> f(X) -> g(X).
> g(X) -> X.
> 2. If example_function is auto-imported, we get a
> compiler warning, and the call will invoke the BIF,
> not the local function. (The name clash is resolved
> "the wrong way")
At least we do get a warning. If we want to be able to change this in
future, the text of the warning should be modified to explicitly say
that the local function may be invoked instead in some future version
David Hopwood <>
More information about the erlang-questions