Files
sx/examples/issue-0033.sx
2026-05-18 17:40:10 +03:00

17 lines
751 B
Plaintext

// Phase 4 verification: an `impl Into(...) for ...` is registered into the
// global impl table when its module is imported anywhere in the program, but
// is only **visible** from files that themselves transitively import the impl's
// defining module. Here:
// - issue-0033-impl.sx declares an `impl Into(Wrap) for s64`.
// - issue-0033-user.sx tries to `xx 7 : Wrap` but only imports the shared
// types — not the impl module.
// - The xx at issue-0033-user.sx:7 must produce a clean "no visible xx
// conversion" diagnostic, not silently fall through to whatever was
// registered in another module.
#import "modules/std.sx";
#import "./issue-0033-impl.sx";
#import "./issue-0033-user.sx";
main :: () -> s32 { run_user(); }