-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)java interopvarargs
Milestone
Description
J.java
public class J {
public void jva(String... s) { }
}S.scala
class C extends J {
override def jva(s: String*): Unit = println("c")
}R.java
public class R {
void main() {
var c = new C();
c.jva("x"); // compilation error: no suitable method found
((J)c).jva("x"); // ok
}
}The Scala compiler emits a "varargs bridge" to override J.jva, it forwards to the Scala varargs method. But the varargs bridge is missing the acc_varargs flag.
Metadata
Metadata
Assignees
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)java interopvarargs