Skip to content

cross-file references on source file struct don't work #2612

@Techatrix

Description

@Techatrix

Zig Version

0.16.0-dev.2535+b5bd49460

ZLS Version

0.16.0-dev.228+ff0daf26

Client / Code Editor / Extensions

VSCodium (1.106.2)

Steps to Reproduce and Observed Behavior

// A.zig
const A = @This();

fn foo(_: A) void {}

var bar: A = undefined;
// B.zig
const A = @import("A.zig");
//    ^ request references here

The response doesn't report any references in A.zig. This issue is specific to source file structs.

Expected Behavior

The response should report the three references in A.zig.

Attach ZLS log output

No response

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