julia-vscode / StaticLint.jl

Static Code Analysis for Julia
Other
145 stars 28 forks source link

False positive: Missing reference: Base #368

Open jakobnissen opened 1 year ago

jakobnissen commented 1 year ago

To reproduce this:

baremodule Flags using Base: @enum @enum Flag flag end

end

* Add `StructTypes` v 1.10.0 to the Project.toml. The error does not occur if StructTypes is not in the Project.

The following lint is displayed (see attached file) 
![image](https://github.com/julia-vscode/StaticLint.jl/assets/23193950/ff7ca385-7dfe-415c-a1b6-392a88715777)

However, it works fine, as `Base` is always importable in baremodules:
```julia
julia> using Foo

julia> Foo.Flags.flag
flag::Flag = 0