Files
ww/test/wcc/data/r699_usepromote_fn/case.ww

18 lines
397 B
Plaintext

//ww:run-exit 42
package main;
// migrated from test/wcc/699_use_promote_alias.c: SK_USE->SK_FN promotion (the original bug) must keep use_alias or `fnmod.flag` fails "unknown type".
package fnmod;
export type flag = enum i32 {
NONE = 0,
A = 42,
};
export fn fnmod() i32 = {
return 0i32;
};
package main;
import fnmod;
fn main() i32 = {
let m: fnmod.flag = fnmod.flag.A;
return m: i32;
};