Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class ElimRepeated extends MiniPhase with InfoTransformer { thisPhase =>
* signatures of a Java varargs method and a Scala varargs override are not the same.
*/
private def overridesJava(sym: Symbol)(using Context) =
sym.owner.info.baseClasses.drop(1).exists { bc =>
sym.memberCanMatchInheritedSymbols
&& sym.owner.info.baseClasses.drop(1).exists { bc =>
bc.is(JavaDefined) && {
val other = bc.info.nonPrivateDecl(sym.name)
other.hasAltWith { alt =>
Expand Down
2 changes: 2 additions & 0 deletions tests/pos/i17066/Bar.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Bar extends Foo:
def this(xs: String*) = this()
3 changes: 3 additions & 0 deletions tests/pos/i17066/Foo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public class Foo {
public Foo(String... xs) { }
}