Skip to content

Commit b9792c3

Browse files
committed
Do not rewrite trait method calls to static helpers in Scala.js.
In Scala.js, even Scala 2 already relies on default methods, and does not use static method helpers.
1 parent 0e48a43 commit b9792c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/LinkScala2Impls.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class LinkScala2Impls extends MiniPhase with IdentityDenotTransformer { thisPhas
7575
def currentClass = ctx.owner.enclosingClass.asClass
7676
app match {
7777
case Apply(sel @ Select(Super(_, _), _), args)
78-
if sel.symbol.owner.is(Scala2x) && currentClass.mixins.contains(sel.symbol.owner) =>
78+
if sel.symbol.owner.is(Scala2x) && currentClass.mixins.contains(sel.symbol.owner) && !ctx.settings.scalajs.value =>
7979
val impl = implMethod(sel.symbol)
8080
if (impl.exists) Apply(ref(impl), This(currentClass) :: args).withSpan(app.span)
8181
else app // could have been an abstract method in a trait linked to from a super constructor

0 commit comments

Comments
 (0)