Skip to content

Commit 475ee8b

Browse files
committed
Revert "Port scala.js changes"
This reverts commit 4df8ed7.
1 parent 4df8ed7 commit 475ee8b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

+2-5
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ class JSCodeGen()(using genCtx: Context) {
13881388
*/
13891389
private def genSuperCall(tree: Apply, isStat: Boolean): js.Tree = {
13901390
implicit val pos = tree.span
1391-
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree
1391+
val Apply(fun @ Select(sup @ Super(_, mix), _), args) = tree
13921392
val sym = fun.symbol
13931393

13941394
if (sym == defn.Any_getClass) {
@@ -1397,11 +1397,8 @@ class JSCodeGen()(using genCtx: Context) {
13971397
} else /*if (isScalaJSDefinedJSClass(currentClassSym)) {
13981398
genJSSuperCall(tree, isStat)
13991399
} else*/ {
1400-
/* #3013 `qual` can be `this.$outer()` in some cases since Scala 2.12,
1401-
* so we call `genExpr(qual)`, not just `genThis()`.
1402-
*/
14031400
val superCall = genApplyMethodStatically(
1404-
genExpr(qual), sym, genActualArgs(sym, args))
1401+
genThis()(sup.span), sym, genActualArgs(sym, args))
14051402

14061403
// Initialize the module instance just after the super constructor call.
14071404
if (isStaticModule(currentClassSym) && !isModuleInitialized &&

project/Build.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ object Build {
10211021
managedSources in Test ++= {
10221022
val dir = fetchScalaJSSource.value / "test-suite"
10231023
(
1024-
(dir / "shared/src/test/scala/org/scalajs/testsuite/compiler" ** (("*.scala":FileFilter) -- "ReflectiveCallTest.scala")).get
1024+
(dir / "shared/src/test/scala/org/scalajs/testsuite/compiler" ** (("*.scala":FileFilter) -- "RegressionTest.scala" -- "ReflectiveCallTest.scala")).get
10251025
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/lang" ** "*.scala").get
10261026
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/io" ** "*.scala").get
10271027
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/math" ** "*.scala").get

0 commit comments

Comments
 (0)