File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
199
199
}
200
200
compareWild
201
201
case tp2 : LazyRef =>
202
- isSubType(tp1, tp2.ref)
202
+ ! tp2.evaluating && isSubType(tp1, tp2.ref)
203
203
case tp2 : AnnotatedType =>
204
204
isSubType(tp1, tp2.tpe) // todo: refine?
205
205
case tp2 : ThisType =>
@@ -299,7 +299,10 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
299
299
}
300
300
compareWild
301
301
case tp1 : LazyRef =>
302
- isSubType(tp1.ref, tp2)
302
+ // If `tp1` is in train of being evaluated, don't force it
303
+ // because that would cause an assertionError. Return false instead.
304
+ // See i859.scala for an example where we hit this case.
305
+ ! tp1.evaluating && isSubType(tp1.ref, tp2)
303
306
case tp1 : AnnotatedType =>
304
307
isSubType(tp1.tpe, tp2)
305
308
case AndType (tp11, tp12) =>
You can’t perform that action at this time.
0 commit comments