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 8a68d6f commit 9b486f8Copy full SHA for 9b486f8
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
@@ -3734,7 +3734,6 @@ object Types {
3734
3735
/** Sentinel for "missing type" */
3736
@sharable case object NoType extends CachedGroundType {
3737
- override def exists = false
3738
override def computeHash(bs: Binders) = hashSeed
3739
3740
0 commit comments