From 7194afe4b9a0bb04700b023a1c29047eb6349f88 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 4 Nov 2014 09:30:36 +0100 Subject: Take supercalls into account for statement context After Mixin, super calls can appear in statemenr sequences. They need to be typechecked and transformed using a special context. --- src/dotty/tools/dotc/typer/Typer.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Typer.scala') diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 3c36a1f25..59fda174d 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1042,8 +1042,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit case Thicket(stats) :: rest => traverse(stats ++ rest) case stat :: rest => - val nestedCtx = if (exprOwner == ctx.owner) ctx else ctx.fresh.setOwner(exprOwner) - buf += typed(stat)(nestedCtx) + buf += typed(stat)(ctx.exprContext(stat, exprOwner)) traverse(rest) case nil => buf.toList -- cgit v1.2.3