Commit Graph

1 Commits

Author SHA1 Message Date
783ffc2ddd Fix JIT compile-let shadow binding: evaluate init before defining local
compile-let called scope-define-local eagerly as part of the let
binding, adding the new local to the scope before compile-expr ran
for the init expression. When nested lets rebound the same variable
(e.g. the hyperscript parser's 4 chained `parts` bindings), the init
expression resolved the name to the new uninitialized slot instead of
the outer one — producing nil where it should have read the previous
value.

Move scope-define-local after compile-expr so init expressions see the
outer scope's binding. Fixes all 11 JIT hyperscript parser failures.
3127/3127 JIT + non-JIT, 25/25 standalone hyperscript tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 12:03:12 +00:00