Files
sx/examples/modules/0726-modules-flat-same-name-variadic/b.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

13 lines
539 B
Plaintext

// b.sx is the SHADOW author for both names, with the OPPOSITE shapes:
// `combine` is VARIADIC, `pick` is FIXED. Each `from_b_*` bare call must pack
// against b's OWN author's signature (the F1 fix) — combine sums its variadic
// pack, pick subtracts its two fixed args.
combine :: (..xs: []i64) -> i64 {
result := 0;
for xs (it) { result = result + it; }
result
}
pick :: (a: i64, b: i64) -> i64 { return b - a; }
from_b_combine :: () -> i64 { return combine(1, 2, 3, 4); }
from_b_pick :: () -> i64 { return pick(2, 7); }