zls icon indicating copy to clipboard operation
zls copied to clipboard

`type` resolution based on call references.

Open vesim987 opened this issue 2 years ago • 0 comments

Feature similar to https://github.com/zigtools/zls/pull/1067 but for type arguments.

Simple repro:

const Bar = struct {
    x: usize,
    fn baz(self: @This()) void {
        _ = self;
    }
};

fn Foo(comptime Type: type) void {
    const x = Type{ .x = 2 };
    x.<complete>;
}

pub fn main() void {
    Foo(Bar);
}

vesim987 avatar Apr 02 '23 21:04 vesim987