Why doesn't ZLS give errors for incorrect usage of function? (opens in new tab)
I have this minimal working example with just doing zig init and changing main.zig to this. const std = @import("std"); const Allocator = std.mem.Allocator; const MyType = struct { const Self = @This(); pub fn init(a: Allocator, somedata: usize) Self { _ = a; _ = somedata; return Self{}; } }; pub fn main(init: std.process.Init) !void { // incorrect usage of MyType.init, missing arg somedata const my_instance = MyType.init(init.gpa); _ = my_instance; } And when I run :lua vim.diagnostic.open_f...
Read the original article