Skip to content

Commit 4165550

Browse files
committed
Fix Stackoverflow in asSeenFrom
We had a stackoverfloa in asSeenFrom even under the old scheme, since there was a bad change involving checkRealizableBounds.
1 parent 4562d30 commit 4165550

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
14121412
val impl1 = cpy.Template(impl)(constr1, parents1, self1, body1)
14131413
.withType(dummy.nonMemberTermRef)
14141414
checkVariance(impl1)
1415-
if (!cls.is(AbstractOrTrait) && !ctx.isAfterTyper) checkRealizableBounds(cls.appliedRef, cdef.namePos)
1415+
if (!cls.is(AbstractOrTrait) && !ctx.isAfterTyper)
1416+
checkRealizableBounds(cls.thisType, cdef.namePos) // !@@@ adapt
14161417
val cdef1 = assignType(cpy.TypeDef(cdef)(name, impl1), cls)
14171418
if (ctx.phase.isTyper && cdef1.tpe.derivesFrom(defn.DynamicClass) && !ctx.dynamicsEnabled) {
14181419
val isRequired = parents1.exists(_.tpe.isRef(defn.DynamicClass))

0 commit comments

Comments
 (0)