fix(qbe): use extraData instead of child3 for hIf else-branch

Block lowering overwrites child3 for statement chaining.
Else block is stored in extraData by hir_lower (matches c_backend).
Fixes QBE parse error 'last block misses jump' in if-without-else chains.
This commit is contained in:
2026-06-02 18:07:35 +03:00
parent eb8179b6d0
commit ec4e748584
10 changed files with 756 additions and 72 deletions
+2
View File
@@ -103,6 +103,8 @@ func Lcx_LowerExpr(ctx: *LowerCtx, expr: *Expr) -> *HirNode {
if kind == ekIdent {
n.kind = hVar;
n.strValue = expr.strValue;
let sym: Symbol = Scope_Lookup(ctx.scope, expr.strValue);
n.typeKind = sym.typeKind;
return n;
}