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.
1 parent abd52fe commit 76e8e83Copy full SHA for 76e8e83
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 */
tests/neg/implicit-shadowing.scala
@@ -25,6 +25,5 @@ object Test {
25
implicitly[C1[T]] // OK: no shadowing for evidence parameters
26
implicitly[C2[U]]
27
28
- ()
29
30
0 commit comments