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
Fixscala#10994: align typed pattern syntax to Scala 2
In Scala 2, a typed pattern `p: T` restricts that `p` can only be a
pattern variable.
In Dotty, scala#6919 allows `p` to be any pattern, in order to support
pattern matching on generic number literals.
This PR aligns the syntax with Scala 2 by stipulating that in a typed
pattern `p: T`, either
- `p` is a pattern variable, or
- `p` is a number literal
0 commit comments