From 0e67b92676ab40564c3cbcaa0fd713a8e87df67d Mon Sep 17 00:00:00 2001 From: citruslee Date: Thu, 22 Dec 2022 19:50:26 +0100 Subject: [PATCH] mach: fix compiler error about missing field_type (#644) --- src/platform/util.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/util.zig b/src/platform/util.zig index b7e38279..d8878268 100644 --- a/src/platform/util.zig +++ b/src/platform/util.zig @@ -169,10 +169,10 @@ pub fn msgSend(obj: anytype, sel_name: [:0]const u8, args: anytype, comptime Ret const FnType = switch (args_meta.len) { 0 => *const fn (@TypeOf(obj), objc.SEL) callconv(.C) ReturnType, - 1 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].field_type) callconv(.C) ReturnType, - 2 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].field_type, args_meta[1].field_type) callconv(.C) ReturnType, - 3 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].field_type, args_meta[1].field_type, args_meta[2].field_type) callconv(.C) ReturnType, - 4 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].field_type, args_meta[1].field_type, args_meta[2].field_type, args_meta[3].field_type) callconv(.C) ReturnType, + 1 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].type) callconv(.C) ReturnType, + 2 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].type, args_meta[1].type) callconv(.C) ReturnType, + 3 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].type, args_meta[1].type, args_meta[2].type) callconv(.C) ReturnType, + 4 => *const fn (@TypeOf(obj), objc.SEL, args_meta[0].type, args_meta[1].type, args_meta[2].type, args_meta[3].type) callconv(.C) ReturnType, else => @compileError("Unsupported number of args"), };