diff options
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 9a432829b..3a66e10d4 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -522,9 +522,7 @@ object SymDenotations { final def isStable(implicit ctx: Context) = { val isUnstable = (this is UnstableValue) || - is(Lazy, butNot = Module) && - !(info.isRealizable || ctx.scala2Mode) && - !hasAnnotation(defn.UncheckedStableAnnot) + is(Lazy, butNot = Module) && !info.isRealizable && !hasAnnotation(defn.UncheckedStableAnnot) (this is Stable) || isType || { if (isUnstable) false else { setFlag(Stable); true } diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 1d4e80601..db0831ba0 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -138,10 +138,12 @@ object Types { case tp: AndOrType => isConcrete(tp.tp1) && isConcrete(tp.tp2) case _ => false } - isConcrete(tp) && tp.abstractTypeMembers.forall { m => + isConcrete(tp) && + tp.abstractTypeMembers.forall { m => val bounds = m.info.bounds bounds.lo <:< bounds.hi - } + } || + ctx.scala2Mode } /** Does this type refer exactly to class symbol `sym`, instead of to a subclass of `sym`? |