From c3ae909e935f1548408f2e400464370ee02b7e82 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 28 Jun 2022 17:56:28 -0700 Subject: 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 --- test/behavior/basic.zig | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'test/behavior/basic.zig') diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index d288d35787..8241579229 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -928,18 +928,6 @@ test "try in labeled block doesn't cast to wrong type" { _ = s; } -test "comptime int in switch in catch is casted to correct inferred type" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; - - var a: error{ A, B }!u64 = 0; - var b = a catch |err| switch (err) { - error.A => 0, - else => unreachable, - }; - _ = b; -} - test "vector initialized with array init syntax has proper type" { comptime { const actual = -@Vector(4, i32){ 1, 2, 3, 4 }; -- cgit v1.2.3