Files
sx/examples/modules/0785-modules-qualified-generic-static-missing-member.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

20 lines
804 B
Plaintext

// A QUALIFIED generic static-method head `a.Box(i64).make(7)` where namespace `a`
// exists but authors NO member named `Box` must DIAGNOSE the missing member —
// never silently fall back to the bare last-wins `struct_template_map` and
// instantiate an unrelated module's same-name `Box` (parallels 0775 for the
// static-method head).
//
// `a.sx` authors only `Other` (no `Box`); `b.sx` authors a generic `Box($T)`.
// The qualified static head `a.Box(i64).make(7)` must report that `a` has no
// member `Box`, NOT resolve to `b.Box.make`.
#import "modules/std.sx";
a :: #import "0785-modules-qualified-generic-static-missing-member/a.sx";
b :: #import "0785-modules-qualified-generic-static-missing-member/b.sx";
main :: () -> i32 {
x := a.Box(i64).make(7);
print("{}\n", x.x);
0
}