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
Type spreads of regular variants in patterns (#6721)
* poc of type spreads of regular variants in patterns
* cleanup
* fix subtype error messages and add fixtures
* changelog
* refactor to handle type params (not supported)
* refactor
* add failing test
* accidental reformat
* snake_case
* wip attempt
* change approach to expanding variant spread in the parsetree instead of typedtree
* cleanup unneeded changes
* disable unused subpattern warning when constructors is from variant pattern spread
* update error
* cleanup
* change to use Ppat_type as transfer mechanism for variant spreads instead of Ppat_var
* formatting
* add example with payloads
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@
15
15
#### :rocket: New Feature
16
16
17
17
- Use FORCE_COLOR environmental variable to force colorized output https://github.com/rescript-lang/rescript-compiler/pull/7033
18
+
- Allow spreads of variants in patterns (`| ...someVariant as v => `) when the variant spread is a subtype of the variant matched on. https://github.com/rescript-lang/rescript-compiler/pull/6721
0 commit comments