Files
sx/examples/modules/0834-modules-namespace-alias-own-target-pin.sx
agra 66bdc70bf1 test: group examples into per-category folders
Move examples/*.sx and their expected/ snapshots into per-category
subfolders (examples/<category>/...). Folder = leading filename token,
with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus
runner and LSP sweep now discover each category's expected/ dir, while
issues/ stays flat. Example 1058's repo-root-relative companion import
is made file-relative. Path strings embedded in 164 snapshots were
regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
2026-06-21 14:41:34 +03:00

16 lines
644 B
Plaintext

// Two modules each declare their OWN alias `t` to different targets, and the
// targets export the SAME member name `f`. Each module's `t.f()` dispatches
// its OWN target's `f` — a.sx gets x.sx's (1), b.sx gets y.sx's (2). The
// caller here never uses `t` itself, so no ambiguity arises.
//
// Regression (issue 0114): the global qualified-fn map registered `t.f`
// first-wins, so both modules used to call whichever registered first.
#import "modules/std.sx";
#import "0834-modules-namespace-alias-own-target-pin/a.sx";
#import "0834-modules-namespace-alias-own-target-pin/b.sx";
main :: () {
print("{} {}\n", use_a(), use_b());
}