Skip to content

Commit 95354c7

Browse files
committed
wasm: add support for zig 0.14.0
1 parent f4c8d28 commit 95354c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wasm.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ pub const Func = opaque {
126126
pub fn init(store: *Store, callback: anytype) !*Func {
127127
const cb_meta = @typeInfo(@TypeOf(callback));
128128
switch (cb_meta) {
129-
.Fn => {
130-
if (cb_meta.Fn.params.len > 0 or cb_meta.Fn.return_type.? != void) {
129+
.@"fn" => {
130+
if (cb_meta.@"fn".params.len > 0 or cb_meta.@"fn".return_type.? != void) {
131131
@compileError("only callbacks with no input args and no results are currently supported");
132132
}
133133
},
@@ -174,7 +174,7 @@ pub const Func = opaque {
174174
// pub fn call(self: *Func, comptime ResultType: type, args: anytype) CallError!ResultType {
175175
// // if (!comptime trait.isTuple(@TypeOf(args)))
176176
// // TODO: remove it
177-
// if (!comptime @typeInfo(@TypeOf(args)).Struct.is_tuple)
177+
// if (!comptime @typeInfo(@TypeOf(args)).@"struct".is_tuple)
178178
// @compileError("Expected 'args' to be a tuple, but found type '" ++ @typeName(@TypeOf(args)) ++ "'");
179179

180180
// const args_len = args.len;
@@ -231,7 +231,7 @@ pub const Func = opaque {
231231
// }
232232

233233
pub fn call(self: *Func, comptime ResultType: type, args: anytype) CallError!ResultType {
234-
if (!comptime @typeInfo(@TypeOf(args)).Struct.is_tuple)
234+
if (!comptime @typeInfo(@TypeOf(args)).@"struct".is_tuple)
235235
@compileError("Expected 'args' to be a tuple, but found type '" ++ @typeName(@TypeOf(args)) ++ "'");
236236

237237
const args_len = args.len;

0 commit comments

Comments
 (0)