diff --git a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala index c9dbb2255508..a37649b24188 100644 --- a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala @@ -1,4 +1,5 @@ -package dotty.tools.dotc +package dotty.tools +package dotc package transform import ast.{Trees, tpd} @@ -71,10 +72,11 @@ class VCInlineMethods extends MiniPhase with IdentityDenotTransformer { evalOnce(qual) { ev => val ctArgs = ctParams.map(tparam => TypeTree(tparam.typeRef.asSeenFrom(ev.tpe, origCls))) - ref(extensionMeth) + transformFollowing( + ref(extensionMeth) .appliedToTypeTrees(mtArgs ++ ctArgs) .appliedTo(ev) - .appliedToArgss(mArgss) + .appliedToArgss(mArgss)) } else ref(extensionMeth) diff --git a/tests/run/i8035.scala b/tests/run/i8035.scala index fe44adf9ea94..605063d1665e 100644 --- a/tests/run/i8035.scala +++ b/tests/run/i8035.scala @@ -2,7 +2,7 @@ implicit class Ops[A](val a: String) extends AnyVal { def foo(e: => String): Unit = () } -def bar(e: => String): Unit = (new Ops("")).foo(e) -def baz(e: => String): Unit = "".foo(e) +def bar(e1: => String): Unit = (new Ops("")).foo(e1) +def baz(e2: => String): Unit = "".foo(e2) @main def Test = baz("") \ No newline at end of file