comptime expandable match statements

This commit is contained in:
2026-07-17 14:29:50 +02:00
parent 1f25e6cd1d
commit 97f1c06057
22 changed files with 120821 additions and 119318 deletions
+7
View File
@@ -659,6 +659,13 @@ lower_expr :: proc(state: ^State, expr_id: hir.Expr_Id) -> ir.Instruction_Id {
case .Invalid:
last = append_recovery_value(state, expr.span, expr.type, expr.diagnostic)
_ = pop(&stack)
case .Void:
last = append_instruction(state, ir.Instruction{
op=.Const, span=expr.span, type=types.VOID,
target=ir.INVALID_REF, a=ir.INVALID_INSTRUCTION, b=ir.INVALID_INSTRUCTION,
diagnostic=source.INVALID_DIAGNOSTIC,
})
_ = pop(&stack)
case .Integer, .Float, .Bool:
last = append_instruction(state, ir.Instruction{
op=.Const, span=expr.span, type=expr.type, integer=expr.integer,