include anytype parameters in inlay hint function parameter count (#1263)

This commit is contained in:
Techatrix
2023-06-24 21:17:07 +00:00
committed by GitHub
parent 7487308948
commit 0b1fc7eb6a
2 changed files with 23 additions and 14 deletions

View File

@@ -48,6 +48,11 @@ test "inlayhints - function self parameter" {
\\const foo: Foo = .{};
\\const _ = foo.bar(<alpha>5,<beta>"");
);
try testInlayHints(
\\const Foo = struct { pub fn bar(self: Foo, alpha: u32, beta: anytype) void {} };
\\const foo: Foo = .{};
\\const _ = foo.bar(<alpha>5,<beta>4);
);
try testInlayHints(
\\const Foo = struct { pub fn bar(self: Foo, alpha: u32, beta: []const u8) void {} };
\\const _ = Foo.bar(<self>undefined,<alpha>5,<beta>"");