test: remove package-wide import assumptions
This commit is contained in:
@@ -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