mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 00:44:32 +01:00
12 lines
208 B
Zig
12 lines
208 B
Zig
const Foo = enum {
|
|
a,
|
|
b,
|
|
c,
|
|
};
|
|
comptime {
|
|
const a: u2 = 3;
|
|
const b: Foo = @enumFromInt(a);
|
|
_ = b;
|
|
}
|
|
|
|
// test_error=enum 'test_comptime_invalid_enum_cast.Foo' has no tag with value '3'
|