aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/error.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-06-28 17:56:28 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-06-28 18:38:25 -0700
commitc3ae909e935f1548408f2e400464370ee02b7e82 (patch)
tree165a355a68a838ec4fa894a0496ab471b0439a42 /test/behavior/error.zig
parenta058696df280ad50c28a2d501a6a2c38a7e3a532 (diff)
downloadzig-c3ae909e935f1548408f2e400464370ee02b7e82.tar.gz
zig-c3ae909e935f1548408f2e400464370ee02b7e82.zip
Revert "AstGen: preserve inferred ptr result loc for breaks"
This reverts commit 8bf3e1f8d0902abd4133e2729b3625c25011c3ff, which introduced miscompilations for peer expressions any time they needed coercions to runtime types. I opened #11957 as a proposal to accomplish the goal of the reverted commit. Closes #11898
Diffstat (limited to 'test/behavior/error.zig')
-rw-r--r--test/behavior/error.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/behavior/error.zig b/test/behavior/error.zig
index c32ca6f6a1..0e3767a4ca 100644
--- a/test/behavior/error.zig
+++ b/test/behavior/error.zig
@@ -709,7 +709,7 @@ test "simple else prong allowed even when all errors handled" {
}
};
var value = S.foo() catch |err| switch (err) {
- error.Foo => 255,
+ error.Foo => @as(u8, 255),
else => |e| return e,
};
try expect(value == 255);