Commit e97abba
committed
fix(codegen): resolve top-level const refs in ExprVar (#73)
ExprVar name lookup fell through to UnboundVariable after checking
locals and variant_tags, never reaching func_indices where TopConst
bindings are stored (negative sentinel: global_idx = -(k+1)).
Add a GlobalGet fallback so const identifiers used inside fn bodies
compile correctly.
check already passed; compile now passes too.1 parent 0c128f0 commit e97abba
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
| |||
0 commit comments