Skip to content

Commit f859c9d

Browse files
author
alexrp
committed
Clarify import conflict semantics.
1 parent a34f38e commit f859c9d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/elixir/lib/kernel/special_forms.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,13 @@ defmodule Kernel.SpecialForms do
302302
All imported modules are also required by default. `import`
303303
also accepts `as:` as an option so it automatically sets up
304304
an alias. Please check `alias` for more information.
305+
306+
## Ambiguous function/macro names
307+
308+
If two modules `A` and `B` are imported and they both contain
309+
a `foo` function with an arity of `1`, an error is only emitted
310+
if an ambiguous call to `foo/1` is actually made; that is, the
311+
errors are emitted lazily, not eagerly.
305312
"""
306313
defmacro import(module, opts)
307314

0 commit comments

Comments
 (0)