fix: rewrite if-expression as statements in hir_lower (unblocks make selfhost)

This commit is contained in:
2026-07-28 20:15:31 +03:00
parent ec5984762b
commit 6f950bcbfb
+2 -1
View File
@@ -2723,7 +2723,8 @@ module HirLower {
if stmt.child1 != null as *Expr && stmt.child1.kind == ekTry {
let tryExpr: *Expr = stmt.child1;
let operandExpr: *Expr = tryExpr.child1;
let operandTypeExpr: *TypeExpr = if operandExpr != null as *Expr { operandExpr.refType } else { null as *TypeExpr };
var operandTypeExpr: *TypeExpr = null as *TypeExpr;
if operandExpr != null as *Expr { operandTypeExpr = operandExpr.refType; }
var typeName: String = "Result";
var errTag: String = "Result_Err";
var okField: String = "Ok_0";