File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -474,7 +474,10 @@ object Flags {
474474 assert(AfterLoadFlags .isTermFlags && AfterLoadFlags .isTypeFlags)
475475
476476 /** 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.
478481
479482 /** Flags that express the variance of a type parameter. */
480483 final val VarianceFlags = Covariant | Contravariant
Original file line number Diff line number Diff line change @@ -599,8 +599,10 @@ object SymDenotations {
599599 )
600600
601601 /** 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+ }
604606
605607 /** Is this a "real" method? A real method is a method which is:
606608 * - not an accessor
You can’t perform that action at this time.
0 commit comments