aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 0ce02d198..d5153bf13 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -844,7 +844,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
checkNoDoubleDefs(cls)
val impl1 = cpy.Template(impl, constr1, parents1, self1, body1)
.withType(dummy.termRef)
- VarianceChecker.check(impl1)
+ checkVariance(impl1)
assignType(cpy.TypeDef(cdef, mods1, name, impl1), cls)
// todo later: check that
@@ -856,6 +856,9 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
// 4. Polymorphic type defs override nothing.
}
+ /** Overridden in retyper */
+ def checkVariance(tree: Tree)(implicit ctx: Context) = VarianceChecker.check(tree)
+
def localDummy(cls: ClassSymbol, impl: untpd.Template)(implicit ctx: Context): Symbol =
ctx.newLocalDummy(cls, impl.pos)