-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incomplete substitution of type parameters in extension methods #11383
Comments
Works in Dotty. |
The problem is that the second |
Maybe same issue as #9222? |
Found this today, which I suspect is a similar cause: trait R[T] { def toX[U >: T]: X[U] }
trait X[A]
class Lose(val dumbo: Int) extends AnyVal {
def fail[Q](foo: R[_ <: Q]): X[Q] = foo.toX
} in which the |
Reverted |
This occurs when combining
AnyVal
extension methods and theAux
pattern for dependent types.Note that surprisingly this compiles (the only difference is a type ascription):
And now the punchline (try it with a
List[A]
):huh? At this point the compiler looks silly 😆
The text was updated successfully, but these errors were encountered: