diff --git a/src/AstGen.zig b/src/AstGen.zig index 820531097c84ce502938771695c355fac67e6031..1aa70d86a9e6509eae7ac81637777b42fef55643 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -12095,7 +12095,10 @@ const GenZir = struct { return gz.addAsIndex(.{ .tag = .save_err_ret_index, .data = .{ .save_err_ret_index = .{ - .operand = if (cond == .if_of_error_type) cond.if_of_error_type else .none, + .operand = switch (cond) { + .if_of_error_type => |x| x, + else => .none, + }, } }, }); }