-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Omit type parameter in extend clause #4820
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
Comments
Maybe a separate issue: the compiler crashes when compiling trait SetOps[A, +C <: SetOps[A, C]] {
def concat(that: Iterable[A]): C = ???
}
class Set1[A] extends SetOps //should be SetOps[A, Set1[A]]
|
Oh, #5010, #5027 and scala/bug#11111 overlap/coincide with both issues. Looks like the first one works only because |
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 1, 2019
The code no longer type checks after scala#5027.
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 1, 2019
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 1, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As opposed to
scalac
, Dotty lets you write:Note that in Dotty and Scala 2, you can write
Here Dotty infers the type parameter toi be
Any
andscalac
infersNothing
.Does it make sense to infer a type argument when there is no call to the super constructor?
The text was updated successfully, but these errors were encountered: