Skip to content

Commit f74f07b

Browse files
committed
Remove unused flag Erroneous
1 parent 7d01268 commit f74f07b

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

compiler/src/dotty/tools/dotc/core/Flags.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,6 @@ object Flags {
378378
/** Denotation is in train of being loaded and completed, used to catch cyclic dependencies */
379379
final val Touched = commonFlag(48, "<touched>")
380380

381-
/** An error symbol */
382-
final val Erroneous = commonFlag(50, "<is-error>")
383-
384381
/** Class has been lifted out to package level, local value has been lifted out to class level */
385382
final val Lifted = commonFlag(51, "<lifted>")
386383

@@ -459,7 +456,7 @@ object Flags {
459456
Module | Package | Deferred | MethodOrHKCommon | Param | ParamAccessor.toCommonFlags |
460457
Scala2ExistentialCommon | Mutable.toCommonFlags | Touched | JavaStatic |
461458
CovariantOrOuter | ContravariantOrLabel | CaseAccessor.toCommonFlags |
462-
NonMember | Erroneous | ImplicitCommon | Permanent | Synthetic |
459+
NonMember | ImplicitCommon | Permanent | Synthetic |
463460
SuperAccessorOrScala2x | Inline
464461

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

515512
/** Flags that can apply to a module val */
516513
final val RetainedModuleValFlags: FlagSet = RetainedModuleValAndClassFlags |

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,6 @@ object SymDenotations {
14761476
base.isClass &&
14771477
( (symbol eq base)
14781478
|| (baseClassSet contains base)
1479-
|| (this is Erroneous)
1480-
|| (base is Erroneous)
14811479
)
14821480

14831481
final override def isSubClass(base: Symbol)(implicit ctx: Context) =

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,7 @@ object Types {
257257
}
258258

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

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

0 commit comments

Comments
 (0)