From 27ba23b30ef282f08b7e80650e8bd4a8b9b54a6c Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Wed, 9 Sep 2026 02:37:45 -0700 Subject: [PATCH] remove this edge case its easy to work around --- src/lib.zig | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/lib.zig b/src/lib.zig index 36a8dd1c44cd4328f95695ff7233f596709b756e..e44be4c0c6264f6bcf91ff9b9bfc51fea47a6e12 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -316,12 +316,6 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val if (v.raw) { if (@hasDecl(opts.Ctx, "pek_" ++ v.name)) @compileError("pek: attempted to call safe custom function: '" ++ v.name ++ "' but did not use '{" ++ v.name ++ "}'"); const func = @field(opts.Ctx, "pek__" ++ v.name); - const Tup = @typeInfo(@TypeOf(func)).@"fn".params[3].type.?; - if (@typeInfo(Tup).@"struct".fields.len == 0) { - // edge case branch because 'struct {}' is counted as a non-tuple - try @call(.auto, func, .{ alloc, writer, opts, Tup{} }); - return; - } comptime var types: [v.args.len]type = @splat(void); inline for (v.args, &types) |arg, *T| T.* = ResolveArg(arg, @TypeOf(data), @TypeOf(ctx)); var args: std.meta.Tuple(&types) = undefined; -- 2.54.0