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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user