Files
sx/examples/packs/0503-packs-pack-type-rep.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

24 lines
876 B
Plaintext

// Variadic heterogeneous type packs — `..$args` — type-system
// representation lock-in.
//
// Step 1c slice for the pack feature (see
// ~/.claude/plans/lets-see-options-for-merry-dijkstra.md). Exercises
// the parser's acceptance of `..$args` inside a `Closure(...)` type
// expression — the pack-shape spelling used by impl headers like
// `impl Into(Block) for Closure(..$args) -> $R`.
//
// Today's parser only accepts `..$args` in fn parameter lists (1b);
// the same syntax inside a `Closure(...)` type expression hits
// `expected type name` at the `..` token. This file pins that
// rejection. The next commit teaches `parseTypeExpr`'s `Closure(...)`
// arm + the type-table representation to carry the pack.
#import "modules/std.sx";
takes_cb :: (cb: Closure(..$args) -> $R) -> void { }
main :: () -> i32 {
print("pack type rep ok\n");
return 0;
}