defmodule Foo do
def func1 do
end
def func2 do
func1
end
end
Foo.func2
The above works.
defmodule Foo do
def func1 do
end
def func2 do
Foo.func1
end
end
Foo.func2
Works too.
But if add an inner module with same name like:
defmodule Foo do
defmodule Foo do
end
def func1 do
end
def func2 do
Foo.func1
end
end
Foo.func2
Does not work.
Is there reason to allow a code like the second example?
It seems strange in a module that module’s name means that module .
I think it’s risk of unexpected behavior.