Skip to content

Commit f9c6139

Browse files
committed
Perform typer realizability checks only during Typer.
1 parent 185333e commit f9c6139

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
986986
val impl1 = cpy.Template(impl)(constr1, parents1, self1, body1)
987987
.withType(dummy.nonMemberTermRef)
988988
checkVariance(impl1)
989-
if (!cls.is(AbstractOrTrait)) checkRealizableBounds(cls.typeRef, cdef.pos)
989+
if (!cls.is(AbstractOrTrait) && !ctx.isAfterTyper) checkRealizableBounds(cls.typeRef, cdef.pos)
990990
assignType(cpy.TypeDef(cdef)(name, impl1, Nil), cls)
991991

992992
// todo later: check that
@@ -1058,7 +1058,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
10581058
def typedImport(imp: untpd.Import, sym: Symbol)(implicit ctx: Context): Import = track("typedImport") {
10591059
val expr1 = typedExpr(imp.expr, AnySelectionProto)
10601060
checkStable(expr1.tpe, imp.expr.pos)
1061-
checkRealizable(expr1.tpe, imp.expr.pos)
1061+
if (!ctx.isAfterTyper) checkRealizable(expr1.tpe, imp.expr.pos)
10621062
assignType(cpy.Import(imp)(expr1, imp.selectors), sym)
10631063
}
10641064

0 commit comments

Comments
 (0)