mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
13 lines
208 B
Zig
13 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'
|