Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
doc
langref
test_comptime_invalid_enum_cast.zig
pretty
plain
permalink
blame
history
•
12 lines
•
215 B
1
const Foo = enum(u2) {
2
a,
3
b,
4
c,
5
};
6
comptime {
7
const a: u2 = 3;
8
const b: Foo = @fromBackingInt(a);
9
_ = b;
10
}
11
12
// test_error=enum 'test_comptime_invalid_enum_cast.Foo' has no tag with value '3'