diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-24 18:21:47 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-10-26 16:24:01 +0100 |
commit | 17b78ba1f82824865f0371c168050c94bf5b3720 (patch) | |
tree | 5eb836470e703cd6a00d93cf16a6f0068a2e24a4 | |
parent | a426e9280aa7ed3dbad923a8b2110b6a1a281771 (diff) | |
download | dotty-17b78ba1f82824865f0371c168050c94bf5b3720.tar.gz dotty-17b78ba1f82824865f0371c168050c94bf5b3720.tar.bz2 dotty-17b78ba1f82824865f0371c168050c94bf5b3720.zip |
Strenghten postCondition of firstTransform
All tests pass, but good to have the condition in there.
-rw-r--r-- | src/dotty/tools/dotc/transform/FirstTransform.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/FirstTransform.scala b/src/dotty/tools/dotc/transform/FirstTransform.scala index 9a1bcd7d9..05255c982 100644 --- a/src/dotty/tools/dotc/transform/FirstTransform.scala +++ b/src/dotty/tools/dotc/transform/FirstTransform.scala @@ -35,6 +35,9 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer { override def checkPostCondition(tree: Tree)(implicit ctx: Context): Unit = tree match { case Select(qual, _) if tree.symbol.exists => assert(qual.tpe derivesFrom tree.symbol.owner, i"non member selection of ${tree.symbol.showLocated} from ${qual.tpe}") + case _: TypeTree => + case _: Import | _: NamedArg | _: TypTree => + assert(false, i"illegal tree: $tree") case _ => } |