defmodule CurrentA do
def public1, do: 1
def public2, do: 2
def public3, do: 3
end
defmodule CurrentA do
import CurrentA, only: [public1: 0]
import CurrentA
def test, do: public2() # No problem whatsoever
enddefmodule CurrentA do
def public1, do: 1
def public2, do: 2
def public3, do: 3
end
defmodule CurrentA do
import CurrentA, only: [public1: 0]
import CurrentA, except: [public3: 0]
def test, do: public2() # undefined function public2/0
end--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/7f1e33c3-21d4-4c0f-b176-bdcc1fe35f81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
defmodule MyHelper do
defmacro __using__(_) do
quote do
import List, only: [foldl: 3]
end
end
end
defmodule A do
use MyHelper
import List, except: [zip: 1]
def test, do: foldr([1,2,3], 10, &(&1 + &2))
end--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/c66685df-3382-41a6-9c41-50959a72c205%40googlegroups.com.