diff options
author | Martin Odersky <odersky@gmail.com> | 2016-02-02 11:26:09 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-09 09:43:08 +0100 |
commit | eaa157860fd278f7d1404bb2aa495547277fd311 (patch) | |
tree | ec9a4ab12cfcafb9ec9792eab4d1e17490f960b2 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | ec4a3a0f4d0b8cccf636d1608896e7cafba9dec0 (diff) | |
download | dotty-eaa157860fd278f7d1404bb2aa495547277fd311.tar.gz dotty-eaa157860fd278f7d1404bb2aa495547277fd311.tar.bz2 dotty-eaa157860fd278f7d1404bb2aa495547277fd311.zip |
Perform typer realizability checks only during Typer.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 542f78f94..dd75e960e 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -986,7 +986,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val impl1 = cpy.Template(impl)(constr1, parents1, self1, body1) .withType(dummy.nonMemberTermRef) checkVariance(impl1) - if (!cls.is(AbstractOrTrait)) checkRealizableBounds(cls.typeRef, cdef.pos) + if (!cls.is(AbstractOrTrait) && !ctx.isAfterTyper) checkRealizableBounds(cls.typeRef, cdef.pos) assignType(cpy.TypeDef(cdef)(name, impl1, Nil), cls) // todo later: check that @@ -1058,7 +1058,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit def typedImport(imp: untpd.Import, sym: Symbol)(implicit ctx: Context): Import = track("typedImport") { val expr1 = typedExpr(imp.expr, AnySelectionProto) checkStable(expr1.tpe, imp.expr.pos) - checkRealizable(expr1.tpe, imp.expr.pos) + if (!ctx.isAfterTyper) checkRealizable(expr1.tpe, imp.expr.pos) assignType(cpy.Import(imp)(expr1, imp.selectors), sym) } |