File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -525,14 +525,10 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
525
525
/** if `tp2 == p.type` and `p: q.type` then try `tp1 <:< q.type` as a last effort.*/
526
526
def comparePaths = tp2 match {
527
527
case tp2 : TermRef =>
528
- tp2.info match {
529
- case tp2i : TermRef =>
530
- isSubType(tp1, tp2i)
531
- case ExprType (tp2i : TermRef ) if (ctx.phase.id > ctx.gettersPhase.id) =>
532
- // After getters, val x: T becomes def x: T
533
- isSubType(tp1, tp2i)
534
- case _ =>
535
- false
528
+ tp2.info.widenExpr match {
529
+ case tp2i : SingletonType =>
530
+ isSubType(tp1, tp2i) // see z1720.scala for a case where this can arise even in typer.
531
+ case _ => false
536
532
}
537
533
case _ =>
538
534
false
File renamed without changes.
You can’t perform that action at this time.
0 commit comments