-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Annotations and java seq #206
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
Helps to track where erroneous type was created.
This doesn't require additional argument. Decision can be made solely from the phaseId.
See scala#209 for explanation.
Check now fails after erasure. Should become error after fixed.
I haven't had a chance to look into it in depth yet, but this PR does not fix any of the three failing tests in #183, and causes an additional test failure. |
Here is a Scala-only program that causes the same assertion failure in FirstTransform as the t1782 Java-interop test.
The other two failures (t294 and t1751) are more complicated, but also involve trees in annotations, so hopefully the same fix will also fix them. The new failure appears to be caused by elimRepeated (incorrectly) transforming the parameter type of the Java varargs bridge. There is a Java varargs method overridden by a Scala varargs method. For the Scala varargs method, the parameter type after elimrepeated is a Seq. In order to override the Java varargs method, a bridge is added to the Scala class with a parameter type of Array. This works correctly without this PR. But with this PR, the parameter type of the varargs bridge somehow gets (incorrectly) changed from Array to Seq. But there is a call to the method passing an argument of type Array, which results in an assertion failure in TreeChecker.adapt. |
Otherwise LGTM |
I propose to get this in now. When it is in I'll see what I can do to generalize overloading resolution, disentangling it from typer. |
@odersky this is not the final version of overload resolution that I'm using now. |
That's not proposed for merging yet, as it triggered other bugs.
@odersky can you please have a look on commits starting from b15bd30?
Changes to typer also made typer not able to retype itself. It fails with a datarace: https://gist.github.com/DarkDimius/d2b5b5cb34e7c400c741 This seems to be unrelated with changes that were made, just triggered by additional code.
I'm not investigating the CyclicReferenceError's that are triggered during Erasure.