File tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/backend/sjs
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1410,7 +1410,7 @@ class JSCodeGen()(using genCtx: Context) {
1410
1410
*/
1411
1411
private def genSuperCall (tree : Apply , isStat : Boolean ): js.Tree = {
1412
1412
implicit val pos = tree.span
1413
- val Apply (fun @ Select (sup @ Super (_, mix ), _), args) = tree
1413
+ val Apply (fun @ Select (sup @ Super (qual, _ ), _), args) = tree
1414
1414
val sym = fun.symbol
1415
1415
1416
1416
if (sym == defn.Any_getClass ) {
@@ -1419,8 +1419,11 @@ class JSCodeGen()(using genCtx: Context) {
1419
1419
} else /* if (isScalaJSDefinedJSClass(currentClassSym)) {
1420
1420
genJSSuperCall(tree, isStat)
1421
1421
} else*/ {
1422
+ /* #3013 `qual` can be `this.$outer()` in some cases since Scala 2.12,
1423
+ * so we call `genExpr(qual)`, not just `genThis()`.
1424
+ */
1422
1425
val superCall = genApplyMethodStatically(
1423
- genThis()(sup.span ), sym, genActualArgs(sym, args))
1426
+ genExpr(qual ), sym, genActualArgs(sym, args))
1424
1427
1425
1428
// Initialize the module instance just after the super constructor call.
1426
1429
if (isStaticModule(currentClassSym) && ! isModuleInitialized &&
You can’t perform that action at this time.
0 commit comments