Skip to content

symbol resolution doesnt ignore primitivesΒ #2545

@xdBronch

Description

@xdBronch

Zig Version

0.16.0-dev.1875+ec13e8eaa

ZLS Version

0.16.0-dev.83+4c6db3c3

Client / Code Editor / Extensions

No response

Steps to Reproduce and Observed Behavior

const @"null" = 0;
const opt = null<cursor>;

goto definition, references, etc will take you to the @"null" declaration which is clearly wrong, hover happens to avoid this by specifically resolving primitives. ideally this could be solved in lookupSymbolGlobal so each request doesnt need to do the same logic, im not sure, is there any reason this couldnt work with tokens directly?

Expected Behavior

dont do that please πŸ™

Log Output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions