aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-01 11:59:13 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:07:00 +0200
commitc87a9dd1f34cd7afe3fba0edfa1463019eaa78bd (patch)
tree7500f567d08b96ccbf3a26dd02b76c0ca42aadda /src/dotty/tools/dotc/transform
parent56f01cdf9081b0b221a01e5ae1a9f10e4aa62da9 (diff)
downloaddotty-c87a9dd1f34cd7afe3fba0edfa1463019eaa78bd.tar.gz
dotty-c87a9dd1f34cd7afe3fba0edfa1463019eaa78bd.tar.bz2
dotty-c87a9dd1f34cd7afe3fba0edfa1463019eaa78bd.zip
First version of inline scheme
To be done: outer accessors To be done: error positions
Diffstat (limited to 'src/dotty/tools/dotc/transform')
-rw-r--r--src/dotty/tools/dotc/transform/PostTyper.scala4
1 files changed, 4 insertions, 0 deletions
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])