File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
153
153
tp1 match {
154
154
case tp1 : NamedType =>
155
155
val sym1 = tp1.symbol
156
+ compareAlias(tp1.info) ||
156
157
(if ((sym1 ne NoSymbol ) && (sym1 eq tp2.symbol))
157
158
ctx.erasedTypes || sym1.isStaticOwner || isSubType(tp1.prefix, tp2.prefix)
158
159
else
@@ -163,8 +164,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
163
164
! tp2.isInstanceOf [WithFixedSym ]
164
165
) ||
165
166
compareHK(tp1, tp2, inOrder = true ) ||
166
- compareHK(tp2, tp1, inOrder = false ) ||
167
- compareAlias(tp1.info)
167
+ compareHK(tp2, tp1, inOrder = false )
168
168
case _ =>
169
169
compareHK(tp2, tp1, inOrder = false ) ||
170
170
compareAlias(NoType )
Original file line number Diff line number Diff line change 263
263
./scala-scala/src/library/scala/collection/generic/GenericSeqCompanion.scala
264
264
./scala-scala/src/library/scala/collection/generic/GenericSetTemplate.scala
265
265
266
- # deep subtype
267
- #./scala-scala/src/library/scala/collection/generic/GenericTraversableTemplate.scala
266
+ ./scala-scala/src/library/scala/collection/generic/GenericTraversableTemplate.scala
268
267
269
268
./scala-scala/src/library/scala/collection/generic/HasNewBuilder.scala
270
269
./scala-scala/src/library/scala/collection/generic/HasNewCombiner.scala
Original file line number Diff line number Diff line change
1
+ // Minimized from scala.collection.generic.GenTraversableFactory plus dependencies
2
+ import scala .annotation .unchecked .uncheckedVariance
3
+
4
+ trait GT [A ] extends GTT [A , GT ]
5
+
6
+ trait HNB [B ]
7
+ trait GTT [+ C , DD [X ] <: GT [X ]] extends HNB [DD [C ] @ uncheckedVariance] // Can be any annotation and still crash
8
+
9
+ class GTF [EE [X ] <: GT [X ] with GTT [X , EE ]]
10
+ {
11
+ def foo [F ]: EE [F ] = ???
12
+ def bar [G ](f : G ): EE [G ] = ???
13
+
14
+ def tabulate : EE [EE [Int ]] = bar(foo)
15
+ }
You can’t perform that action at this time.
0 commit comments