Skip to content

Commit 76e8e83

Browse files
committed
Fix problem underlying build failure
It was an interaction with the new classification of blocks as types or terms. Revert the test to its formerly failing state.
1 parent abd52fe commit 76e8e83

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ object Trees {
486486
case class Block[-T >: Untyped] private[ast] (stats: List[Tree[T]], expr: Tree[T])
487487
extends Tree[T] {
488488
type ThisTree[-T >: Untyped] = Block[T]
489-
override def isTerm: Boolean = expr.isTerm
490489
override def isType: Boolean = expr.isType
490+
override def isTerm: Boolean = !isType // this will classify empty trees as terms, which is necessary
491491
}
492492

493493
/** if cond then thenp else elsep */

tests/neg/implicit-shadowing.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ object Test {
2525
implicitly[C1[T]] // OK: no shadowing for evidence parameters
2626
implicitly[C2[U]]
2727
}
28-
()
2928
}
3029
}

0 commit comments

Comments
 (0)