Skip to content

Commit 1832dc2

Browse files
committed
Fix isGround logic
1 parent 1b14a6b commit 1832dc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3279,7 +3279,7 @@ object Types {
32793279

32803280
def isGround(acc: TypeAccumulator[Boolean])(implicit ctx: Context): Boolean = {
32813281
if (!isGroundKnown) {
3282-
isGroundCache = acc.foldOver(false, this)
3282+
isGroundCache = acc.foldOver(true, this)
32833283
isGroundKnown = true
32843284
}
32853285
isGroundCache
@@ -4797,7 +4797,7 @@ object Types {
47974797
}
47984798

47994799
class isGroundAccumulator(implicit ctx: Context) extends TypeAccumulator[Boolean] {
4800-
def apply(x: Boolean, tp: Type) = x || {
4800+
def apply(x: Boolean, tp: Type) = x && {
48014801
tp match {
48024802
case _: TypeParamRef => false
48034803
case tp: TypeVar => apply(x, tp.underlying)

0 commit comments

Comments
 (0)