fix: allow lexical import shadowing
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// neg_let — local `let shadowmod: i32 = ...` shadows the imported
|
||||
// module from inside a fn body. Same rule fires for nested-scope
|
||||
// let binds, not just params.
|
||||
// Legacy neg_let, now a positive declaration-point case. The initializer
|
||||
// resolves shadowmod.say through the file-scope import; after the declaration
|
||||
// shadowmod denotes the closer i32 binding. Builds and runs 42.
|
||||
|
||||
package paramshadowmod;
|
||||
package main;
|
||||
|
||||
import shadowmod;
|
||||
|
||||
export fn main() i32 = {
|
||||
let shadowmod: i32 = 0i32;
|
||||
fn main() i32 = {
|
||||
let shadowmod: i32 = shadowmod.say();
|
||||
return shadowmod;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user