File tree 3 files changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/core 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -211,8 +211,8 @@ object TypeErasure {
211
211
case tp : TypeAlias => isUnboundedGeneric(tp.alias)
212
212
case tp : TypeBounds => ! tp.hi.derivesFrom(defn.ObjectClass )
213
213
case tp : TypeProxy => isUnboundedGeneric(tp.underlying)
214
- case tp : AndType => isUnboundedGeneric(tp.tp1) || isUnboundedGeneric(tp.tp2)
215
- case tp : OrType => isUnboundedGeneric(tp.tp1) && isUnboundedGeneric(tp.tp2)
214
+ case tp : AndType => isUnboundedGeneric(tp.tp1) && isUnboundedGeneric(tp.tp2)
215
+ case tp : OrType => isUnboundedGeneric(tp.tp1) || isUnboundedGeneric(tp.tp2)
216
216
case _ => false
217
217
}
218
218
Original file line number Diff line number Diff line change 1
- class Coll [E ] extends java.util.Collection [E ] { // error: needs to be abstract
2
- def toArray [T ](a : Array [T ]): Array [T ] = ??? // error: cannot override
1
+ abstract class Coll [E ] extends java.util.Collection [E ] {
2
+ override def toArray [T ](a : Array [T ]): Array [T ] = ??? // error: has different signature
3
3
}
Original file line number Diff line number Diff line change
1
+ abstract class Coll [E ] extends java.util.Collection [E ] {
2
+ override def toArray [T ](a : Array [T with Object ]): Array [T with Object ] = ??? // error: cannot override
3
+ }
You can’t perform that action at this time.
0 commit comments