fix code broken from previous commit

This commit is contained in:
Jacob G-W
2021-06-19 21:10:22 -04:00
committed by Andrew Kelley
parent b83b3883ba
commit 9fffffb07b
162 changed files with 720 additions and 148 deletions

View File

@@ -151,14 +151,14 @@ test "while on optional with else result follow break prong" {
test "while on error union with else result follow else prong" {
const result = while (returnError()) |value| {
break value;
} else |err| @as(i32, 2);
} else |_| @as(i32, 2);
try expect(result == 2);
}
test "while on error union with else result follow break prong" {
const result = while (returnSuccess(10)) |value| {
break value;
} else |err| @as(i32, 2);
} else |_| @as(i32, 2);
try expect(result == 10);
}