Skip to content

Remove PreName add (almost) all other implicit conversions #4077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ object Types {
}

/** Is this type different from NoType? */
def exists: Boolean = true
final def exists: Boolean = !this.eq(NoType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this.ne(NoType), otherwise this commit LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me also


/** This type, if it exists, otherwise `that` type */
def orElse(that: => Type) = if (exists) this else that
Expand Down Expand Up @@ -3711,7 +3711,6 @@ object Types {

/** Sentinel for "missing type" */
@sharable case object NoType extends CachedGroundType {
override def exists = false
override def computeHash(bs: Binders) = hashSeed
}

Expand Down