15 lines
263 B
Plaintext
15 lines
263 B
Plaintext
const Error = error{
|
|
unexpected_result,
|
|
};
|
|
|
|
const main = fn() Error!void {
|
|
const a: s32 = 1;
|
|
const b: s32 = 2;
|
|
const c: s32 = a + b;
|
|
const d: s32 = 3;
|
|
const e: s32 = d - c;
|
|
if (e != 0) {
|
|
return Error.unexpected_result;
|
|
}
|
|
}
|