From c87a9dd1f34cd7afe3fba0edfa1463019eaa78bd Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 1 Sep 2016 11:59:13 +0200 Subject: First version of inline scheme To be done: outer accessors To be done: error positions --- src/dotty/tools/dotc/transform/PostTyper.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dotty/tools/dotc/transform') diff --git a/src/dotty/tools/dotc/transform/PostTyper.scala b/src/dotty/tools/dotc/transform/PostTyper.scala index 6af225035..51851a589 100644 --- a/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/src/dotty/tools/dotc/transform/PostTyper.scala @@ -207,6 +207,10 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran } case tree: Select => transformSelect(paramFwd.adaptRef(fixSignature(tree)), Nil) + case tree: Super => + if (ctx.owner.enclosingMethod.isInlineMethod) + ctx.error(em"super not allowed in inline ${ctx.owner}", tree.pos) + super.transform(tree) case tree: TypeApply => val tree1 @ TypeApply(fn, args) = normalizeTypeArgs(tree) Checking.checkBounds(args, fn.tpe.widen.asInstanceOf[PolyType]) -- cgit v1.2.3