// SK_USE→SK_FN promotion (the bug). fnmod exports `fn fnmod()` and // `type flag = enum`. Pass-1 installs SK_TYPE("flag", mod="fnmod") and // SK_USE("fnmod") (the `fn fnmod` isn't installed in pass-1; pass-1 // only handles N_USE + N_TYPEDECL). Pass-1.5 then sees the N_FNDECL // "fnmod", finds the SK_USE local, and promotes in place to SK_FN. // Pre-fix that promotion forgot `use_alias = 1`, so `fnmod.flag` // resolution failed with "unknown type fnmod.flag". Post-fix the // build succeeds and exit code = flag.A = 42. package usepromote; import fnmod; fn main() i32 = { let m: fnmod.flag = fnmod.flag.A; return m: i32; };