Commit ed70c54
fix(parser): #558 — honest-reject removed
#558's premise is stale. Refinement/dependent types — and the `T where (P)`
and `assume(predicate)` forms — were REMOVED 2026-04-10 (spec.md §711-713,
§1849). `TRefined` does not exist in the AST and refinement syntax
PARSE-ERRORS today; there is no silent-accept / accepts-wrong-program path,
so this is not the live soundness hole the issue describes. The genuine
residual defects are honesty ones:
1. The `ASSUME` keyword token was left dangling (no production) by the grammar
removal, so `assume(...)` surfaced a cryptic generic parse error. Add a
conflict-free honest-rejection production (ASSUME is a fresh token — zero
new LR conflicts, verified: 68 s/r + 7 r/r unchanged) that raises a
deliberate, named error pointing at the removed feature (CORE-05 deferred).
2. test/e2e/fixtures/refinement_types.affine contained only generic functions
(no refinement, no `where`) yet produced a green "refinement_types" test —
false coverage. Rename to generic_functions.affine +
test_parse_generic_functions, and correct its header comment.
NOT done here (out of scope / non-viable):
- The refinement TYPE form `T where (P)` cannot be honestly fenced without
regressing trait where-clauses: the shared `WHERE` token forces a
shift/reduce decision before the predicate is visible (menhir resolves it by
shifting into the refinement, breaking `fn f() -> T where C`). It still
surfaces a generic parse error.
- The doc-lies (CAPABILITY-MATRIX.adoc "TRefined parses", STATE/TECH-DEBT
CORE-05 rows) are owner-only edits (strict SPDX-header pre-commit gate on
.adoc/.md); flagged for manual reconciliation.
- Dead error codes E0305/W0701 left in place (harmless; removal is churn).
New tests (test/test_e2e.ml, "E2E Parse"):
- generic_functions → parses (renamed, honest coverage)
- assume() honest-rejection (#558) → deliberate parse error (negative)
Full suite 452/452 green.
Refs #558
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>assume(...); fix misnamed fixture1 parent 9bf8d57 commit ed70c54
5 files changed
Lines changed: 60 additions & 10 deletions
File tree
- lib
- test
- e2e/fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
1110 | 1127 | | |
1111 | 1128 | | |
1112 | 1129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
183 | 202 | | |
184 | 203 | | |
185 | 204 | | |
| |||
251 | 270 | | |
252 | 271 | | |
253 | 272 | | |
254 | | - | |
| 273 | + | |
| 274 | + | |
255 | 275 | | |
256 | 276 | | |
257 | 277 | | |
| |||
0 commit comments