Assertion failed when casting argument to enum #1196

This commit is contained in:
Christoffer Lerno
2024-05-16 16:07:55 +02:00
parent c40c93340d
commit 97c9bd7ce0
3 changed files with 29 additions and 0 deletions

View File

@@ -1576,6 +1576,7 @@ void llvm_emit_cast(GenContext *c, CastKind cast_kind, Expr *expr, BEValue *valu
llvm_value_set(value, llvm_zext_trunc(c, value->value, llvm_get_type(c, to_type)), to_type);
return;
}
value->type = type_lowering(to_type);
return;
case CAST_SABOOL:
llvm_value_fold_optional(c, value);