File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -192,10 +192,6 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
192192 }
193193 else
194194 transformSelect(tree, Nil )
195- case tree : Super =>
196- if (ctx.owner.enclosingMethod.isInlinedMethod)
197- ctx.error(SuperCallsNotAllowedInline (ctx.owner), tree.pos)
198- super .transform(tree)
199195 case tree : Apply =>
200196 methPart(tree) match {
201197 case Select (nu : New , nme.CONSTRUCTOR ) if isCheckable(nu) =>
Original file line number Diff line number Diff line change @@ -476,6 +476,9 @@ class Typer extends Namer
476476 case pt : SelectionProto if pt.name == nme.CONSTRUCTOR => true
477477 case _ => false
478478 }
479+ val enclosingInlineable = ctx.owner.ownersIterator.findSymbol(_.isInlineableMethod)
480+ if (enclosingInlineable.exists && ! Inliner .isLocal(qual1.symbol, enclosingInlineable))
481+ ctx.error(SuperCallsNotAllowedInline (enclosingInlineable), tree.pos)
479482 pt match {
480483 case pt : SelectionProto if pt.name.isTypeName =>
481484 qual1 // don't do super references for types; they are meaningless anyway
You can’t perform that action at this time.
0 commit comments