const Error = error{ unexpected_result, }; const expect = fn (ok: bool) Error!void { if (!ok) { return Error.unexpected_result; } }