fix: allow lexical import shadowing

This commit is contained in:
2026-08-22 17:53:31 +09:00
parent 89f519d5cb
commit 6279d46652
19 changed files with 1420 additions and 270 deletions

View File

@@ -606,10 +606,8 @@ struct Checker {
* rather than colliding io.read. */
int cur_source; /* lexical source-file scope of the declaration
* currently being checked. */
Node *file; /* current N_FILE root; used by check_module_shadow
* to consult the declaring source file's own `use`
* directives when refusing param/let names that
* would shadow an imported module bareword. */
Node *file; /* current N_FILE root; owns source-local import
* qualifier lookup and usage accounting. */
int loops; /* nesting count for break/continue */
int matcharms; /* nesting count for yield */
int errs;