Sema: improve behavior of comptime_int backed enums

This commit is contained in:
Veikka Tuominen
2022-09-02 16:08:20 +03:00
parent a9cdacff95
commit f281f3d10e
4 changed files with 23 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
pub export fn entry() void {
const E = enum(comptime_int) { a, b, c, _ };
var e: E = .a;
_ = e;
}
// error
// backend=stage2
// target=native
//
// :3:12: error: variable of type 'tmp.entry.E' must be const or comptime