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
unapply methods used in patterns are allowed implicit arguments. However they're not allowed type parameters, which makes this not all that useful. For example, when helping Jan Kriesten with #882 I tried the following solution:
<console>:2:error: '=>' expected but '[' found.
case isClass[String] =>"foo"
The code works if you specialise T to a String instead, so the implicits are working fine, but the inability to specify a type parameter on the pattern makes this not so useful.
The text was updated successfully, but these errors were encountered:
unapply methods used in patterns are allowed implicit arguments. However they're not allowed type parameters, which makes this not all that useful. For example, when helping Jan Kriesten with #882 I tried the following solution:
Gives the error
The code works if you specialise T to a String instead, so the implicits are working fine, but the inability to specify a type parameter on the pattern makes this not so useful.
The text was updated successfully, but these errors were encountered: