We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 981bdfd + 76e8e83 commit 6fcb8b8Copy full SHA for 6fcb8b8
compiler/src/dotty/tools/dotc/ast/Trees.scala
@@ -486,8 +486,8 @@ object Trees {
486
case class Block[-T >: Untyped] private[ast] (stats: List[Tree[T]], expr: Tree[T])
487
extends Tree[T] {
488
type ThisTree[-T >: Untyped] = Block[T]
489
- override def isTerm: Boolean = expr.isTerm
490
override def isType: Boolean = expr.isType
+ override def isTerm: Boolean = !isType // this will classify empty trees as terms, which is necessary
491
}
492
493
/** if cond then thenp else elsep */
0 commit comments