David Gonzalez Martin 8e4fc03d1b Modernize std API
2024-03-08 16:35:40 -06:00

22 lines
307 B
Plaintext

const n = 6;
const foo = fn() s32 {
var a: s32 = 0;
while (true) {
if (a == n) {
return a;
}
a += 1;
}
}
const Error = error{
unexpected_result,
};
const main = fn() Error!void{
if (foo() - n != 0) {
return Error.unexpected_result;
}
}