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
Bogus type error with constructor params and anonymous classes #3048
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3048?orig=1 |
@adriaanm said: minimal test case: class A
class B[T <: A](cons: T)
object C extends B/*[A]*/(new A{}) |
@adriaanm said: First, I thought it was because case (3) of adapt creates a TypeApply tree like Then, I figure the full patch I cobbled together so far is at: |
@hubertp said: |
Commit Message Bot (anonymous) said: // Example of code which did not compile, but now does Closes #4110, #3048. I already ran this by moors, so review by odersky. |
The following code causes bogus type error, when anonymous classes are used as parameters:
Possible workaround at the moment is to provide an explicit type ascription:
The text was updated successfully, but these errors were encountered: