diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-11-18 20:03:35 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-11-18 20:04:16 -0500 |
| commit | 3829e200ecc251d6b55686c24bdbd579c5a2246a (patch) | |
| tree | 6f7e67f54f17f15e67d694fb2bef4e74f8a13238 /src | |
| parent | 3c05ad401282b0eb8b9960a2b521fc1375c4087e (diff) | |
| download | zig-3829e200ecc251d6b55686c24bdbd579c5a2246a.tar.gz zig-3829e200ecc251d6b55686c24bdbd579c5a2246a.zip | |
fix assertion failure related to @intToEnum
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 3a22d0aa17..55f17b811d 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -10153,7 +10153,7 @@ static IrInstruction *ir_analyze_int_to_enum(IrAnalyze *ira, IrInstruction *sour return ira->codegen->invalid_instruction; } - assert(actual_type->id == ZigTypeIdInt); + assert(actual_type->id == ZigTypeIdInt || actual_type->id == ZigTypeIdComptimeInt); if (instr_is_comptime(target)) { ConstExprValue *val = ir_resolve_const(ira, target, UndefBad); |
