julia
julia copied to clipboard
"WARNING: replacing module..." is no longer printed when replacing modules
Not sure if this is intended as part of binding replacement or not, but wanted to open an issue just in case.
On nightly:
julia> module Foo; end
Main.Foo
julia> module Foo; end
Main.Foo
On 1.11:
julia> module Foo; end
Main.Foo
julia> module Foo; end
WARNING: replacing module Foo.
Main.Foo
I removed the warning intentionally. This was UB before, so the warning was appropriate. Now this is just a special case of constant redefinition, which we never warn for.
That said, we should probably extend the world age printing to the module case as well:
julia> module Foo; end
Main.Foo
julia> oldFoo = Foo
Main.Foo
julia> module Foo; end
Main.Foo
julia> oldFoo
Main.Foo
is this also intended?
julia> x = 1
1
julia> module Foo
export x
x = 2
end
Main.Foo
julia> using .Foo
julia> x
1
previously would give WARNING: using Foo.x in module Main conflicts with an existing identifier.