code wiki / _hdl_build / nx_shadow_probe.nx

nx_shadow_probe.nx source

↩ module page · 6 lines · 454 B

1// nx_shadow_probe.nx -- decides NishiLang same-name resolution when a LOCAL func coexists with an 2// IMPORTED one. Local g_pn prints a marker; if output is SHADOW_LOCAL the local shadows the import 3// (coexistence is behaviour-safe); if it prints "7" the import wins (coexistence UNSAFE). license_tier: ORIGINAL 4import "nx_gate_emit_lib.nx" 5func g_pn(v: i64) -> i64 { g_puts("SHADOW_LOCAL\n" as *u8); return 0 } 6func main() -> i64 { g_pn(7); return 0 }