LanguageServer.jl icon indicating copy to clipboard operation
LanguageServer.jl copied to clipboard

Constants are forgotten after save

Open fredrikekre opened this issue 1 year ago • 0 comments

$ cat src/TestPackage.jl
module TestPackage

include("Inner.jl")
using .Inner

function bar(::Foo)
    foo()
end

end # module

$ cat src/Inner.jl
module Inner
    const Foo = Int
    foo() = println("hi")
    export Foo, foo
end

Here, when I first open src/TestPackage.jl I can hover over Foo and get the correct info, and there is no missing reference. But when I save the file Foo is forgotten and shows missing reference, and I can't hover it. It only seems to happen when the inner module is in another file. Note that it does not happen for the function foo. Seems to be just for consts.

fredrikekre avatar Oct 13 '22 11:10 fredrikekre