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 c9189c2 commit bb7c2daCopy full SHA for bb7c2da
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -134,7 +134,7 @@ object Types {
134
}
135
136
/** Is this type different from NoType? */
137
- def exists: Boolean = true
+ final def exists: Boolean = this.ne(NoType)
138
139
/** This type, if it exists, otherwise `that` type */
140
def orElse(that: => Type) = if (exists) this else that
@@ -3766,7 +3766,6 @@ object Types {
3766
3767
/** Sentinel for "missing type" */
3768
@sharable case object NoType extends CachedGroundType {
3769
- override def exists = false
3770
override def computeHash(bs: Binders) = hashSeed
3771
3772
0 commit comments