diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-03-10 17:23:35 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-03-10 17:23:35 +0100 |
commit | fad8fdc0c5868a1e2415005cabe7c528c349f789 (patch) | |
tree | 653b0b27238e2cb2b304565056968863c328f0ae /src/dotty/tools/dotc/Compiler.scala | |
parent | 41756e46e151bdd1917b9ff041bc1b3d4581b875 (diff) | |
download | dotty-fad8fdc0c5868a1e2415005cabe7c528c349f789.tar.gz dotty-fad8fdc0c5868a1e2415005cabe7c528c349f789.tar.bz2 dotty-fad8fdc0c5868a1e2415005cabe7c528c349f789.zip |
Compiler#newRun: reset the context _before_ initializing a new run
Previously it was incorrectly done after the run was initialized, this
fixes #391.
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 8 |
1 files changed, 3 insertions, 5 deletions
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 |