Commit dd57a0b
fix(selfhost): AST producer — type-annotated let value split → 339/579
emit_let used top_assign to find the `=`, whose `>=`/`<=`/`==` guard wrongly
skipped the assignment `=` immediately after a generic close `>` — so
`let x: Option<Int> = Some(...)` dropped its entire value subtree. Switched the let
to the reference's rule (parse_let_stmt): the value split is simply the FIRST `=`
after the name (a let's name/annotation never contains `=`, so no guard is needed).
top_assign is kept for assignment statements, which do need the comparison guard.
Corpus reach: 331 -> 339 / 579 byte-exact, still 0 run-failures. Floor -> 339.
New sample let_typed.rss (incl. `let flag: Bool = seed >= 0`).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent a101d4e commit dd57a0b
3 files changed
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
1525 | | - | |
| 1525 | + | |
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1052 | 1063 | | |
1053 | 1064 | | |
1054 | 1065 | | |
| |||
1172 | 1183 | | |
1173 | 1184 | | |
1174 | 1185 | | |
1175 | | - | |
1176 | | - | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
1177 | 1191 | | |
1178 | 1192 | | |
1179 | 1193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments