Next slice of the variadic heterogeneous type packs (`..$args`) feature: type-system representation. Per the FFI cadence rule, this commit locks in the parser-rejection behavior so the next commit's type-rep extension surfaces as a behavior shift. examples/154-pack-type-rep.sx uses `..$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 recognizes `..$args` only at the parameter-list site (1b); `parseTypeExpr`'s `Closure(...)` arm calls `parseTypeExpr` per position and hits "expected type name" at the `..` token. Snapshot captures the rejection at line 18, column 26. Next commit (1c.B): - Parser: `parseTypeExpr` Closure arm accepts `..$args` as the trailing pack marker. AST gets a `pack_name: ?[]const u8` (or equivalent) field on `ClosureTypeExpr`. - types.zig: `FunctionInfo` / `ClosureInfo` gain `pack_start: ?u32` so the pack shape is distinct from any concrete arity in the type table. Hash/eql updated. - type_bridge: `resolveClosureType` threads pack_start through. - 154 flips green. 192/192 example tests + `zig build test` green.
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
1
|