zig/test/behavior/bugs/12723.zig
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00

9 lines
284 B
Zig

const expect = @import("std").testing.expect;
test "Non-exhaustive enum backed by comptime_int" {
const E = enum(comptime_int) { a, b, c, _ };
comptime var e: E = .a;
e = @enumFromInt(E, 378089457309184723749);
try expect(@intFromEnum(e) == 378089457309184723749);
}