authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-09-09 02:37:45-07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-09-09 02:37:45-07:00
log27ba23b30ef282f08b7e80650e8bd4a8b9b54a6c
tree2a692c959abbd4cb16314df5d010258e546afb42
parent8f33d474a433452338ba7c9f726cdd86bbed49a1
signature Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

remove this edge case its easy to work around


1 files changed, 0 insertions(+), 6 deletions(-)

src/lib.zig-6
......@@ -316,12 +316,6 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val
316316 if (v.raw) {
317317 if (@hasDecl(opts.Ctx, "pek_" ++ v.name)) @compileError("pek: attempted to call safe custom function: '" ++ v.name ++ "' but did not use '{" ++ v.name ++ "}'");
318318 const func = @field(opts.Ctx, "pek__" ++ v.name);
319 const Tup = @typeInfo(@TypeOf(func)).@"fn".params[3].type.?;
320 if (@typeInfo(Tup).@"struct".fields.len == 0) {
321 // edge case branch because 'struct {}' is counted as a non-tuple
322 try @call(.auto, func, .{ alloc, writer, opts, Tup{} });
323 return;
324 }
325319 comptime var types: [v.args.len]type = @splat(void);
326320 inline for (v.args, &types) |arg, *T| T.* = ResolveArg(arg, @TypeOf(data), @TypeOf(ctx));
327321 var args: std.meta.Tuple(&types) = undefined;