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
fix(#15784): ident rule for pat match was too strict
close#15784
Scala 2 allows backticked identifier and capital identifier in pattern
match, but Scala 3 mistakenly prohibited them.
For example, the following code is valid in Scala 2,
```scala
List(42) match {
case List(_, Rest @ _*) => Rest
case List(_, `Rest` @ _*) => `Rest`
_ => ???
}
```
whereas it resulted in `Not Found Rest` error in Scala 3.
This is because the condition to detect wildcard pattern was so strict
that it chose the wrong match arm; `case _ => ifExpr`.
0 commit comments