1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
const std = @import("std"); const expect = std.testing.expect; test "labeled break from labeled block expression" { var y: i32 = 123; const x = blk: { y += 1; break :blk y; }; try expect(x == 124); try expect(y == 124); } // test