mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 15:12:31 +00:00
9 lines
210 B
Zig
9 lines
210 B
Zig
comptime {
|
|
const err = error.AnError;
|
|
const number = @intFromError(err) + 10;
|
|
const invalid_err = @errorFromInt(number);
|
|
_ = invalid_err;
|
|
}
|
|
|
|
// test_error=integer value '11' represents no error
|