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.
15 lines
659 B
Plaintext
15 lines
659 B
Plaintext
// issue 0105 / F2 — same-name VALUE const, own-wins. Two flat-imported modules
|
|
// each declare a top-level `K` with a different value and a function that reads
|
|
// `K` bare. Each function's OWN reference must bind ITS OWN module's `K`
|
|
// (own-wins), exactly as same-name structs (0754) and functions (0722) do —
|
|
// NOT the global last-wins author: `a_k` returns 1 and `b_k` returns 2,
|
|
// resolved by the source-aware const author selector (`selectModuleConst`).
|
|
#import "modules/std.sx";
|
|
#import "0786-modules-same-name-const-own/a.sx";
|
|
#import "0786-modules-same-name-const-own/b.sx";
|
|
|
|
main :: () -> i32 {
|
|
print("a={} b={}\n", a_k(), b_k());
|
|
0
|
|
}
|