We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.13.0
NVIM v0.11.0-dev-1664+ge71d2c817d / nvim-lspconfig
zls incorrectly says the type of const arr = .{ "1", "22" }; is [2]*const [1:0]u8 when it's actually struct{comptime *const [1:0]u8 = "1", comptime *const [2:0]u8 = &.{ 50, 50 }}
const arr = .{ "1", "22" };
[2]*const [1:0]u8
struct{comptime *const [1:0]u8 = "1", comptime *const [2:0]u8 = &.{ 50, 50 }}
const std = @import("std"); pub fn main() void { const arr = .{ "1", "22" }; std.debug.print("type of arr: {}\n", .{@TypeOf(arr)}); }
If I were to put zls' inferred type here, then it'd be
const arr: [2]*const [1:0]u8 = .{ "1", "22" }; // expected type '*const [1:0]u8', found '*const [2:0]u8'
My main issue is the inlay type
imo the way this hint is displayed, the expectation should be that changing the hint into real code should work.
The text was updated successfully, but these errors were encountered:
this looks like #2065
Sorry, something went wrong.
No branches or pull requests
Zig Version
0.13.0
ZLS Version
0.13.0
Client / Code Editor / Extensions
NVIM v0.11.0-dev-1664+ge71d2c817d / nvim-lspconfig
Steps to Reproduce and Observed Behavior
zls incorrectly says the type of
const arr = .{ "1", "22" };
is[2]*const [1:0]u8
when it's actuallystruct{comptime *const [1:0]u8 = "1", comptime *const [2:0]u8 = &.{ 50, 50 }}
If I were to put zls' inferred type here, then it'd be
Expected Behavior
My main issue is the inlay type
imo the way this hint is displayed, the expectation should be that changing the hint into real code should work.
The text was updated successfully, but these errors were encountered: