test: remove package-wide import assumptions
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// #30 dir-package — the imported module `aa` for the VALUE-BEFORE-USE
|
||||
// twin. Identical to ../../modfn_coexist/aa/aa.ww; kept as its own dir so
|
||||
// the two layouts are independently buildable. Driver: the
|
||||
// modfn_coexist_vbu leg of the decl-namespace gate (NNN_declns_sep.c).
|
||||
// #30 dir-package — the imported package for the declaration-before-import
|
||||
// twin. It stays in its own directory so the two layouts are independently
|
||||
// buildable.
|
||||
package aa;
|
||||
export fn helper() i32 = { return 5; };
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #30 VALUE-BEFORE-USE — the twin of ../modfn_coexist/main.ww with the
|
||||
// decl order flipped: `fn aa` is declared BEFORE `import aa`. cstage is
|
||||
// order-independent (installs every SK_USE in a first pass); wwstage
|
||||
// installs in source order, so this direction exercises a DISTINCT path
|
||||
// (installdecl's N_USE arm must set use_alias on the pre-installed value
|
||||
// sym). The gate asserts this builds + runs to 6 AND emits asm
|
||||
// byte-identical to the use-before-value order — silent order-dependence
|
||||
// is exactly what regresses.
|
||||
// Declaration-before-import twin of ../modfn_coexist/main.ww. The distinct
|
||||
// local name follows Go's import/package-scope collision rule while retaining
|
||||
// the order-independence check for installing a real import binding.
|
||||
package main;
|
||||
fn aa() i32 = { return 1; };
|
||||
fn localaa() i32 = { return 1; };
|
||||
import aa;
|
||||
export fn main() i32 = { return aa() + aa.helper(); };
|
||||
export fn main() i32 = { return localaa() + aa.helper(); };
|
||||
|
||||
Reference in New Issue
Block a user