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

@@ -1,6 +1,5 @@
// pos_rename — positive case. The fn param is renamed away from the
// imported module's bareword, so the rule doesn't fire and the body
// can call `shadowmod.say()` cleanly. Built + run; exit code = 42.
// pos_rename — control with an unrelated parameter name. The file-scope
// import remains visible in probe. Both stages build and run 42.
package main;
@@ -11,6 +10,6 @@ fn probe(s: str) i32 = {
return shadowmod.say();
};
export fn main() i32 = {
fn main() i32 = {
return probe("hi");
};