aboutsummaryrefslogtreecommitdiff
path: root/tests/pos-java-interop
Commit message (Collapse)AuthorAgeFilesLines
* Fix overriding a Java method with varargsGuillaume Martres2017-03-122-0/+8
| | | | | | | | | | | | | | | | | | If A method like: override def foo(x: Object*) overrides a Java method, it needs to be rewritten as: def foo(x: Seq[Object]) override def foo(x: Array[Object]): Object = foo(Predef.wrapRefArray(x)) This should be handled by ElimRepeated but there were two bugs: - `addVarArgsBridge` was called at phase `thisTransformer.next`, this is too late to create the bridge since `T*` has already been rewritten as `Seq[T]` - The original method symbol needs to have the `override` flag dropped, since it doesn't override anything. Furthermore, RefChecks had to be moved after ElimRepeated, otherwise the testcase would fail the overriding checks.
* Upgrade backend to fix Java interop for inner classesGuillaume Martres2017-01-271-2/+1
| | | | | | The upgraded backend contains a single new PR: https://github.com/DarkDimius/scala/pull/4 which fixes Java interop with Dotty-emitted inner classes in objects.
* Partially fix Java interop for emitted inner classesGuillaume Martres2017-01-112-0/+17
| | | | | | | | | | | The backend uses `rawname` to define the "inner name" of an InnerClass entry in a classfile, this should be the simple name of the class before any mangling takes place. Fixing this allows Java code to reference dotty inner classes, except if they're defined in objects which is still broken until https://github.com/DarkDimius/scala/pull/4 is merged and a new backend is published.
* Fix partest compilation of java-interop tests by moving themGuillaume Martres2016-11-2275-0/+356
Previously, the tests where all in tests/pos/java-interop which means that partest would try to run them as one single test, this failed because some of these tests define classes with the same name. We could fix this by putting them all in separate packages but for now it's simple to move them to tests/pos-java-interop (they will still be run individually as they should thanks to the `java_all` test defined in tests.scala)