File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1402,6 +1402,9 @@ test "continue in inline for inside a comptime switch" {
14021402}
14031403
14041404test "continue nested inline for loop" {
1405+ // TODO: https://github.com/ziglang/zig/issues/13175
1406+ if (builtin .zig_backend != .stage1 ) return error .SkipZigTest ;
1407+
14051408 var a : u8 = 0 ;
14061409 loop : inline for ([_ ]u8 { 1 , 2 }) | x | {
14071410 inline for ([_ ]u8 {1 }) | y | {
@@ -1414,3 +1417,22 @@ test "continue nested inline for loop" {
14141417 }
14151418 try expect (a == 2 );
14161419}
1420+
1421+ test "continue nested inline for loop in named block expr" {
1422+ // TODO: https://github.com/ziglang/zig/issues/13175
1423+ if (builtin .zig_backend != .stage1 ) return error .SkipZigTest ;
1424+
1425+ var a : u8 = 0 ;
1426+ loop : inline for ([_ ]u8 { 1 , 2 }) | x | {
1427+ a = b : {
1428+ inline for ([_ ]u8 {1 }) | y | {
1429+ if (x == y ) {
1430+ continue :loop ;
1431+ }
1432+ }
1433+ break :b x ;
1434+ };
1435+ try expect (x == 2 );
1436+ }
1437+ try expect (a == 2 );
1438+ }
You can’t perform that action at this time.
0 commit comments