You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("defer means x inside the block is equal to\n", .{x});
The above when compiled returns the following error:
error: unused argument in 'defer means x inside the block is equal to
'
1 => @compileError("unused argument in '" ++ fmt ++ "'"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
print__anon_2902: /Users/maclong/.local/share/mise/installs/zig/0.13.0/lib/std/io/Writer.zig:24:26
print: /Users/maclong/.local/share/mise/installs/zig/0.13.0/lib/std/io.zig:324:47
remaining reference traces hidden; use '-freference-trace' to see all reference traces
It should be displayed in the editor before compiling.
Expected Behavior
Error should display as an error in editor so we can easily catch these errors before compilation.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
doing this is very hard if not effectively impossible, at least correctly. std.fmt relies heavily on comptime which zls doesnt support yet, its the same reason there arent proper type errors in general. in the meantime you can try the build_on_save feature, heres a nice article to get it setup https://kristoff.it/blog/improving-your-zls-experience/
Zig Version
0.13.0
ZLS Version
0.14.0-dev.135+b481aae
Client / Code Editor / Extensions
Helix Editor
Steps to Reproduce and Observed Behavior
The above when compiled returns the following error:
It should be displayed in the editor before compiling.
Expected Behavior
Error should display as an error in editor so we can easily catch these errors before compilation.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: