Skip to content

Commit a9e2231

Browse files
authored
Merge pull request #4256 from dotty-staging/remove/Erroneous-flag
Remove unused flag Erroneous
2 parents 4ded045 + f74f07b commit a9e2231

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 that are not (re)set when completing the denotation, or, if symbol is
@@ -511,7 +508,7 @@ object Flags {
511508
final val RetainedModuleValAndClassFlags: FlagSet =
512509
AccessFlags | Package | Case |
513510
Synthetic | JavaDefined | JavaStatic | Artifact |
514-
Erroneous | Lifted | MixedIn | Specialized
511+
Lifted | MixedIn | Specialized
515512

516513
/** Flags that can apply to a module val */
517514
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
@@ -1478,8 +1478,6 @@ object SymDenotations {
14781478
base.isClass &&
14791479
( (symbol eq base)
14801480
|| (baseClassSet contains base)
1481-
|| (this is Erroneous)
1482-
|| (base is Erroneous)
14831481
)
14841482

14851483
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)