-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #3273: Extend cooking to parent types #3317
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
Conversation
tests/pos/i3273/client_2.scala
Outdated
val a = (_: Bar_1.A[AnyRef]).foo() | ||
val b = (_: Bar_1.B[AnyRef]).bar() | ||
def test(x: Bar_1.A[AnyRef]): Bar_1.B[_] = x | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to test these cases under joint compilation, too (usually changes to classfile parser need to be mirrored in JavaParsers
)
I'm guessing some more work will be needed to deal with raw types in type parameter bound position. |
Legacy-tests seems to always compile files together, but cooking only works for Java files read by ClassfileParser. I don't think it makes sense to change that - if we compile Java files from sources we should demand that raw types are re-written as wildcard types. So to fix this we move the offending files to pos-special and compile them only in CompilationTests.
From the last commit message:
Unfortunately this isn't always easy, because of (Class<List<?>>) (Class<?>) List.class Something like this was necessary to compile the strawman: #3028 |
Of course, it's possible that the 13 years old bug report on this issue will be fixed one day: https://bugs.openjdk.java.net/browse/JDK-6184881 :) |
I have decided that as far as I am concerned I won't spend anymore cycles on this. If somebody really wants to use raw types in jointly compiled Java code, asking them to do the rewrite is justified even if it might be difficult. |
To prevent failure CompilationTests we need an extra nested directory.
No description provided.