Skip to content

Commit 17b78ba

Browse files
committed
Strenghten postCondition of firstTransform
All tests pass, but good to have the condition in there.
1 parent a426e92 commit 17b78ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dotty/tools/dotc/transform/FirstTransform.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer {
3535
override def checkPostCondition(tree: Tree)(implicit ctx: Context): Unit = tree match {
3636
case Select(qual, _) if tree.symbol.exists =>
3737
assert(qual.tpe derivesFrom tree.symbol.owner, i"non member selection of ${tree.symbol.showLocated} from ${qual.tpe}")
38+
case _: TypeTree =>
39+
case _: Import | _: NamedArg | _: TypTree =>
40+
assert(false, i"illegal tree: $tree")
3841
case _ =>
3942
}
4043

0 commit comments

Comments
 (0)