diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index c2864093ff70..119c02eba297 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -365,21 +365,7 @@ object Applications { /** Splice new method reference `meth` into existing application `app` */ private def spliceMeth(meth: Tree, app: Tree)(using Context): Tree = app match { - case Apply(fn, args) => - // Constructors always have one leading non-implicit parameter list. - // Empty list is inserted for constructors where the first parameter list is implicit. - // - // Therefore, we need to ignore the first empty argument list. - // This is needed for the test tests/neg/i12344.scala - // - // see NamerOps.normalizeIfConstructor - // - if args == Nil - && !fn.isInstanceOf[Apply] - && app.tpe.isImplicitMethod - && fn.symbol.isConstructor - then meth - else spliceMeth(meth, fn).appliedToArgs(args) + case Apply(fn, args) => spliceMeth(meth, fn).appliedToArgs(args) case TypeApply(fn, targs) => // Note: It is important that the type arguments `targs` are passed in new trees // instead of being spliced in literally. Otherwise, a type argument to a default diff --git a/tests/pos/i22061.scala b/tests/pos/i22061.scala new file mode 100644 index 000000000000..0e44967ac97b --- /dev/null +++ b/tests/pos/i22061.scala @@ -0,0 +1,5 @@ +abstract class A()(implicit val x: Int = 3) +trait B extends A + +abstract class C()(using y: Int = 9) +class D extends C() \ No newline at end of file