Commit 651cc12
traits.affine:124 was the last parse blocker. Root cause is NOT a
compiler grammar gap: `while let` already parses. It is broken stdlib
code — `Iterator::collect` returned `Vec[Item]` and used `Vec::new()` /
`.push()`, but **`Vec` is not defined anywhere in the stdlib** (the
whole stdlib builds lists with `[]` + `++`, never `Vec`; `Vec::new()`
also exercised an unsupported `Type::lower_fn()` associated-call form).
Resolve-at-source: rewrite `collect` in the stdlib's own list idiom
(`let mut result = []; while let Some(item) = self.next() { result =
result ++ [item]; } return result`) rather than add speculative `Vec`
+ associated-function grammar to prop up code that never had a `Vec`.
Effect: traits.affine clears its last parse wall (PARSE 124 ->
TYPECHECK; the remaining `ref 't ~ Int` is a distinct deeper defect in
the `impl Eq for Int` blocks). Pure stdlib change — suite unaffected.
Advances #135. Refs #128, #135.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c94461a commit 651cc12
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | | - | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
0 commit comments