Closed
Description
I just spent a good amount of time trying to figure out why my code would not compile after a refactoring, because the error message was inadequate.
Minimized example
case class Var(name: String)
@main def f = Var("a") match
case Var(name, _) => name: String
Output
Found: (name : Any)
Required: String
Expectation
Too many patterns given in `Var`