When enum variant is missing import, it should contain the enum's span #5188
Labels
bug
Something isn't working
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
language server
LSP server
In this example, the enum
DeepEnum
is not imported. When it's just the enum specified, the compiler diagnostic correctly reports the enum's span. However, when a variant of the enum is specified, the variant's span is specified. In both cases, it should be the enum's span, never the variant's span.This is relevant to LSP because we need use the diagnostic's span to determine which symbol needs to be imported (for auto-import suggestions).
The text was updated successfully, but these errors were encountered: