ffi M5.A.next.1c.A: pack type rep — lock in parser rejection
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.
This commit is contained in:
1
tests/expected/154-pack-type-rep.exit
Normal file
1
tests/expected/154-pack-type-rep.exit
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
tests/expected/154-pack-type-rep.txt
Normal file
1
tests/expected/154-pack-type-rep.txt
Normal file
@@ -0,0 +1 @@
|
||||
/Users/agra/projects/sx/examples/154-pack-type-rep.sx:18:26: error: expected type name
|
||||
Reference in New Issue
Block a user