Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 2 additions & 5 deletions compiler/src/dotty/tools/dotc/core/Flags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@ object Flags {
/** Denotation is in train of being loaded and completed, used to catch cyclic dependencies */
final val Touched = commonFlag(48, "<touched>")

/** An error symbol */
final val Erroneous = commonFlag(50, "<is-error>")

/** Class has been lifted out to package level, local value has been lifted out to class level */
final val Lifted = commonFlag(51, "<lifted>")

Expand Down Expand Up @@ -459,7 +456,7 @@ object Flags {
Module | Package | Deferred | MethodOrHKCommon | Param | ParamAccessor.toCommonFlags |
Scala2ExistentialCommon | Mutable.toCommonFlags | Touched | JavaStatic |
CovariantOrOuter | ContravariantOrLabel | CaseAccessor.toCommonFlags |
NonMember | Erroneous | ImplicitCommon | Permanent | Synthetic |
NonMember | ImplicitCommon | Permanent | Synthetic |
SuperAccessorOrScala2x | Inline

/** Flags guaranteed to be set upon symbol creation, or, if symbol is a top-level
Expand Down Expand Up @@ -510,7 +507,7 @@ object Flags {
final val RetainedModuleValAndClassFlags: FlagSet =
AccessFlags | Package | Case |
Synthetic | JavaDefined | JavaStatic | Artifact |
Erroneous | Lifted | MixedIn | Specialized
Lifted | MixedIn | Specialized

/** Flags that can apply to a module val */
final val RetainedModuleValFlags: FlagSet = RetainedModuleValAndClassFlags |
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1476,8 +1476,6 @@ object SymDenotations {
base.isClass &&
( (symbol eq base)
|| (baseClassSet contains base)
|| (this is Erroneous)
|| (base is Erroneous)
)

final override def isSubClass(base: Symbol)(implicit ctx: Context) =
Expand Down
5 changes: 1 addition & 4 deletions compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,7 @@ object Types {
}

/** Is this type produced as a repair for an error? */
final def isError(implicit ctx: Context): Boolean = stripTypeVar match {
case _: ErrorType => true
case tp => (tp.typeSymbol is Erroneous) || (tp.termSymbol is Erroneous)
}
final def isError(implicit ctx: Context): Boolean = stripTypeVar.isInstanceOf[ErrorType]

/** Is some part of this type produced as a repair for an error? */
final def isErroneous(implicit ctx: Context): Boolean = existsPart(_.isError, forceLazy = false)
Expand Down