| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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)
|