File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,8 @@ object Types {
305305 that.existsPart(this == _)
306306
307307 /** Does this type not refer to TypeParamRefs or uninstantiated TypeVars? */
308- final def isGround (implicit ctx : Context ): Boolean = true
308+ final def isGround (implicit ctx : Context ): Boolean =
309+ (new isGroundAccumulator).apply(true , this )
309310
310311 /** Is this a type of a repeated parameter? */
311312 def isRepeatedParam (implicit ctx : Context ): Boolean =
@@ -3279,7 +3280,7 @@ object Types {
32793280
32803281 def isGround (acc : TypeAccumulator [Boolean ])(implicit ctx : Context ): Boolean = {
32813282 if (! isGroundKnown) {
3282- isGroundCache = acc.foldOver(false , this )
3283+ isGroundCache = acc.foldOver(true , this )
32833284 isGroundKnown = true
32843285 }
32853286 isGroundCache
@@ -4797,7 +4798,7 @@ object Types {
47974798 }
47984799
47994800 class isGroundAccumulator (implicit ctx : Context ) extends TypeAccumulator [Boolean ] {
4800- def apply (x : Boolean , tp : Type ) = x || {
4801+ def apply (x : Boolean , tp : Type ) = x && {
48014802 tp match {
48024803 case _ : TypeParamRef => false
48034804 case tp : TypeVar => apply(x, tp.underlying)
You can’t perform that action at this time.
0 commit comments