-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
Suppose I have a module
module Atest
hello() = "Hello, World!"
end # module
And another module
module Btest
using Atest: hello
struct Foo
hello::String
Foo() = new(hello())
end
end # module
Then I get
julia> using ExplicitImports, Btest
julia> print_explicit_imports(Btest)
Module Btest is not relying on any implicit imports.
However, module Btest has stale explicit imports for this 1 unused name:
• hello is unused but it was imported from Atest at
/home/ubuntu/raicode-master/raicode/packages/Btest/src/Btest.jl:3:14
which is incorrect. hello is used in the constructor for Foo().
If I rename the field in Foo to, say hello2, then I don't get the warning
module Ctest
using Atest: hello
struct Foo
hello2::String
Foo() = new(hello())
end
end # module
tests ok:
julia> print_explicit_imports(Ctest)
Module Ctest is not relying on any implicit imports.
julia>
ericphanson