-
Notifications
You must be signed in to change notification settings - Fork 21
parameterized java class with protected constructor incorrectly fails, then issues misleading message #6617
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
Imported From: https://issues.scala-lang.org/browse/SI-6617?orig=1 |
@khernyo said (edited on Sep 12, 2015 5:35:40 PM UTC): // A.scala
class A[M] protected(m: M)
class B extends A("a")
This compiles in 2.8, but not later. It doesn't compile in current dotty either (same error message). On the other hand, specifying the type parameter makes it compile in all of them. |
This is why we don't mention tickets or people in commits. |
Compiles in 2.8, regressed somewhere between 2.8 and 2.9. The fact that the type parameter is not inferred is not that big a deal by itself, but it is made much worse by the error message.
Notes: if S and J are in the same package, it compiles. If J is not parameterized, it compiles. If J is instead the equivalent scala class with a protected[foo] constructor, it compiles.
The text was updated successfully, but these errors were encountered: