You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6b455b4
Browse filesBrowse the repository at this point in the historyBrowse files
The constructor patterns a variant spread ...t expands into were tagged
with a res.patFromVariantSpread attribute, so that the unused-pattern check
doesn't report the ones earlier cases already match. They now get a
Tpat_variant_spread entry in pat_extra instead. The or-patterns grouping
them inside the expansion are marked too: when earlier cases matched
several of them, that group was reported as an unused sub-pattern without
a location. The root of the expansion stays unmarked, so a spread that is
unused as a whole is still reported.
Signed-off-by: Christoph Knittel <christoph@knittel.cc>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
24
24
#### :bug: Bug fix
25
25
26
+
- Don't report constructors of a variant spread pattern (`...t`) that earlier cases already match as an unused sub-pattern without a location (warning 12). PR_LINK
26
27
- Keep `@warning("-4")` on `if` expressions when formatting; the formatter dropped it. https://github.com/rescript-lang/rescript/pull/8741
27
28
- Fix the formatter dropping a `@res.ternary` attribute written in source, e.g. `let b = @res.ternary x`, and print `@JSX` and `@res.ternary` with the same parens as other attributes, e.g. `(@JSX x) + 1`. https://github.com/rescript-lang/rescript/pull/8740
28
29
- Respect `@warning` attributes on the module in `module type of`, e.g. `module type of @warning("-3") DeprecatedModule`, which still reported the warning. https://github.com/rescript-lang/rescript/pull/8738
0 commit comments