File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -211,8 +211,8 @@ object TypeErasure {
211211 case tp : TypeAlias => isUnboundedGeneric(tp.alias)
212212 case tp : TypeBounds => ! tp.hi.derivesFrom(defn.ObjectClass )
213213 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)
216216 case _ => false
217217 }
218218
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
33}
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