zig/test/cases/error_unions.2.zig

10 lines
125 B
Zig
Raw Normal View History

2022-04-27 21:59:55 +01:00
pub fn main() u8 {
var e: anyerror!u8 = error.Foo;
_ = &e;
2022-04-27 21:59:55 +01:00
const i = e catch 10;
return i - 10;
}
// run
//