File tree 2 files changed +8
-3
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -474,7 +474,10 @@ object Flags {
474
474
assert(AfterLoadFlags .isTermFlags && AfterLoadFlags .isTypeFlags)
475
475
476
476
/** A value that's unstable unless complemented with a Stable flag */
477
- final val UnstableValue = Mutable | Method
477
+ final val UnstableValue =
478
+ Mutable | Method | Erased
479
+ // TODO: Erased should be treated as stable just like final lazy is.
480
+ // Otherwise the usefulness of Erased is very much reduced.
478
481
479
482
/** Flags that express the variance of a type parameter. */
480
483
final val VarianceFlags = Covariant | Contravariant
Original file line number Diff line number Diff line change @@ -599,8 +599,10 @@ object SymDenotations {
599
599
)
600
600
601
601
/** Is this a denotation of a stable term (or an arbitrary type)? */
602
- final def isStable (implicit ctx : Context ) =
603
- isType || ! is(Erased ) && (is(Stable ) || ! (is(UnstableValue ) || info.isInstanceOf [ExprType ]))
602
+ final def isStable (implicit ctx : Context ) = {
603
+ def isUnstableValue = is(UnstableValue ) || info.isInstanceOf [ExprType ]
604
+ isType || is(Stable ) || ! isUnstableValue
605
+ }
604
606
605
607
/** Is this a "real" method? A real method is a method which is:
606
608
* - not an accessor
You can’t perform that action at this time.
0 commit comments