After brief investigation it appears that in every __using__ macro like this in new_opts there is a duplicate of excepted function, which should be removed instead.
defmacro __using__(opts \\ []) do
{:ok, new_opts} =
Keyword.get_and_update(opts, :except, fn except ->
{:ok, [<>: 2] ++ (except || [])}
end)
if Access.get(opts, :override_kernel, true) do
quote do
import Kernel, unquote(new_opts)
import unquote(__MODULE__), unquote(opts)
end
else
quote do: import(unquote(__MODULE__), unquote(new_opts))
end
end
When trying to import
Witchcraft
without some functions that are also defined inKernel
module, compile error occurs:After brief investigation it appears that in every
__using__
macro like this innew_opts
there is a duplicate of excepted function, which should be removed instead.