File tree 2 files changed +5
-5
lines changed
src/dotty/tools/dotc/core 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -522,9 +522,7 @@ object SymDenotations {
522
522
final def isStable (implicit ctx : Context ) = {
523
523
val isUnstable =
524
524
(this is UnstableValue ) ||
525
- is(Lazy , butNot = Module ) &&
526
- ! (info.isRealizable || ctx.scala2Mode) &&
527
- ! hasAnnotation(defn.UncheckedStableAnnot )
525
+ is(Lazy , butNot = Module ) && ! info.isRealizable && ! hasAnnotation(defn.UncheckedStableAnnot )
528
526
(this is Stable ) || isType || {
529
527
if (isUnstable) false
530
528
else { setFlag(Stable ); true }
Original file line number Diff line number Diff line change @@ -138,10 +138,12 @@ object Types {
138
138
case tp : AndOrType => isConcrete(tp.tp1) && isConcrete(tp.tp2)
139
139
case _ => false
140
140
}
141
- isConcrete(tp) && tp.abstractTypeMembers.forall { m =>
141
+ isConcrete(tp) &&
142
+ tp.abstractTypeMembers.forall { m =>
142
143
val bounds = m.info.bounds
143
144
bounds.lo <:< bounds.hi
144
- }
145
+ } ||
146
+ ctx.scala2Mode
145
147
}
146
148
147
149
/** Does this type refer exactly to class symbol `sym`, instead of to a subclass of `sym`?
You can’t perform that action at this time.
0 commit comments