fix: allow lexical import shadowing
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
// pos_crossmod — cur_mod-filtering positive. Replaces the abolished
|
||||
// pos_selfimp (self-import is hard-rejected post-#16). This module
|
||||
// (paramshadowmod) imports `shadowmod`, and the bundle also pulls module
|
||||
// `crossmod`, whose probe() has a param named `shadowmod`. crossmod does
|
||||
// NOT import shadowmod, so the shadow rule — filtered by the binding's
|
||||
// own module — must NOT trip crossmod's param, even though a sibling
|
||||
// module in the same bundle imports that leaf. Build + run; exit = 2.
|
||||
// pos_crossmod — file-local import ownership control. This source imports
|
||||
// shadowmod, while crossmod's separate source has a parameter of that name
|
||||
// and no such import. The caller's qualifier cannot leak into the sibling
|
||||
// package's lexical scope. Both stages build and run 2.
|
||||
|
||||
package main;
|
||||
|
||||
import shadowmod;
|
||||
import crossmod;
|
||||
|
||||
export fn main() i32 = {
|
||||
fn main() i32 = {
|
||||
let _ = shadowmod.say();
|
||||
return crossmod.probe("hi");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user