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.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index f58ccbdbc..9c5fb09b0 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -951,8 +951,10 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
val typer1 = localTyper(sym)
typer1.typedDefDef(tree, sym)(localContext(tree, sym).setTyper(typer1))
case tree: untpd.TypeDef =>
- if (tree.isClassDef) typedClassDef(tree, sym.asClass)(localContext(tree, sym))
- else typedTypeDef(tree, sym)(localContext(tree, sym).setNewScope)
+ if (tree.isClassDef)
+ typedClassDef(tree, sym.asClass)(localContext(tree, sym).setMode(ctx.mode &~ Mode.InSuperCall))
+ else
+ typedTypeDef(tree, sym)(localContext(tree, sym).setNewScope)
case _ => typedUnadapted(desugar(tree), pt)
}
}