Skip to content

Commit

Permalink
Do not rewrite trait method calls to static helpers in Scala.js.
Browse files Browse the repository at this point in the history
In Scala.js, even Scala 2 already relies on default methods, and
does not use static method helpers.
  • Loading branch information
sjrd committed Aug 27, 2019
1 parent 0e48a43 commit b9792c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class LinkScala2Impls extends MiniPhase with IdentityDenotTransformer { thisPhas
def currentClass = ctx.owner.enclosingClass.asClass
app match {
case Apply(sel @ Select(Super(_, _), _), args)
if sel.symbol.owner.is(Scala2x) && currentClass.mixins.contains(sel.symbol.owner) =>
if sel.symbol.owner.is(Scala2x) && currentClass.mixins.contains(sel.symbol.owner) && !ctx.settings.scalajs.value =>
val impl = implMethod(sel.symbol)
if (impl.exists) Apply(ref(impl), This(currentClass) :: args).withSpan(app.span)
else app // could have been an abstract method in a trait linked to from a super constructor
Expand Down

0 comments on commit b9792c3

Please sign in to comment.