Skip to content

Commit

Permalink
stage2: Skip test exposing ziglang#13175
Browse files Browse the repository at this point in the history
This PR (ziglang#12873) in combination with this particular test exposed
a pre-existing bug (ziglang#13175).

This means that the test for ziglang#13038 has regressed
  • Loading branch information
topolarity committed Oct 16, 2022
1 parent e0983a1 commit bf9ecd0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/behavior/eval.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,9 @@ test "continue in inline for inside a comptime switch" {
}

test "continue nested inline for loop" {
// TODO: https://github.com/ziglang/zig/issues/13175
if (builtin.zig_backend != .stage1) return error.SkipZigTest;

var a: u8 = 0;
loop: inline for ([_]u8{ 1, 2 }) |x| {
inline for ([_]u8{1}) |y| {
Expand All @@ -1414,3 +1417,22 @@ test "continue nested inline for loop" {
}
try expect(a == 2);
}

test "continue nested inline for loop in named block expr" {
// TODO: https://github.com/ziglang/zig/issues/13175
if (builtin.zig_backend != .stage1) return error.SkipZigTest;

var a: u8 = 0;
loop: inline for ([_]u8{ 1, 2 }) |x| {
a = b: {
inline for ([_]u8{1}) |y| {
if (x == y) {
continue :loop;
}
}
break :b x;
};
try expect(x == 2);
}
try expect(a == 2);
}

0 comments on commit bf9ecd0

Please sign in to comment.