From fad8fdc0c5868a1e2415005cabe7c528c349f789 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Tue, 10 Mar 2015 17:23:35 +0100 Subject: Compiler#newRun: reset the context _before_ initializing a new run Previously it was incorrectly done after the run was initialized, this fixes #391. --- src/dotty/tools/dotc/Compiler.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/dotty/tools/dotc/Compiler.scala') diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index 0911197bd..cb758c002 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -104,10 +104,8 @@ class Compiler { } def newRun(implicit ctx: Context): Run = { - try new Run(this)(rootContext) - finally { - ctx.base.reset() - ctx.runInfo.clear() - } + ctx.base.reset() + ctx.runInfo.clear() + new Run(this)(rootContext) } } \ No newline at end of file -- cgit v1.2.3