File tree 2 files changed +11
-2
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -210,9 +210,9 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
210
210
case t : LazyRef =>
211
211
// Dereference a lazyref to detect underlying matching types, but
212
212
// be careful not to get into an infinite recursion. If recursion count
213
- // exceeds `DerefLimit`, approximate with `NoType ` instead.
213
+ // exceeds `DerefLimit`, approximate with `t ` instead.
214
214
derefCount += 1
215
- if ( derefCount >= DerefLimit ) NoType
215
+ if t.evaluating || derefCount >= DerefLimit then t
216
216
else try mapOver(t.ref) finally derefCount -= 1
217
217
case tp : TypeVar =>
218
218
tp
Original file line number Diff line number Diff line change
1
+ type HasThisB [T ] = HasThis { type This <: T }
2
+ trait HasThis {
3
+ type This >: this .type <: HasThisB [This ]
4
+ }
5
+
6
+ type FB [T ] = F { type This <: T }
7
+ class F extends HasThis {
8
+ type This >: this .type <: FB [This ]
9
+ }
You can’t perform that action at this time.
0 commit comments