- Add enum.from_ordinal and fault.from_ordinal

- Deprecate cast-style conversion from integer to enum.
- Make deprecation an error in test mode.
This commit is contained in:
Christoffer Lerno
2024-12-23 15:27:59 +01:00
parent 6078598aff
commit e453e6f9ca
26 changed files with 153 additions and 87 deletions

View File

@@ -1498,11 +1498,6 @@ void llvm_emit_cast(GenContext *c, CastKind cast_kind, Expr *expr, BEValue *valu
case CAST_ANYPTR:
llvm_emit_any_pointer(c, value, value);
break;
case CAST_INTERR:
to_type = type_lowering(to_type);
llvm_value_rvalue(c, value);
value->value = llvm_zext_trunc(c, value->value, llvm_get_type(c, to_type));
break;
case CAST_ERROR:
UNREACHABLE
case CAST_STRPTR: