mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
12 lines
255 B
Zig
12 lines
255 B
Zig
const std = @import("std");
|
|
|
|
pub fn main() void {
|
|
const err = error.AnError;
|
|
var number = @intFromError(err) + 500;
|
|
_ = &number;
|
|
const invalid_err = @errorFromInt(number);
|
|
std.debug.print("value: {}\n", .{invalid_err});
|
|
}
|
|
|
|
// exe=fail
|