Type parameters should be allowed on patterns #884
Labels
Milestone
Comments
|
Imported From: https://issues.scala-lang.org/browse/SI-884?orig=1 |
|
@SethTisue said: |
|
@SethTisue said: |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: