Skip to content

Commit 8195baf

Browse files
committed
Merge pull request #399 from smarter/fix/ctxReset
Compiler#newRun: reset the context _before_ initializing a new run
2 parents 41756e4 + fad8fdc commit 8195baf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/dotty/tools/dotc/Compiler.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ class Compiler {
104104
}
105105

106106
def newRun(implicit ctx: Context): Run = {
107-
try new Run(this)(rootContext)
108-
finally {
109-
ctx.base.reset()
110-
ctx.runInfo.clear()
111-
}
107+
ctx.base.reset()
108+
ctx.runInfo.clear()
109+
new Run(this)(rootContext)
112110
}
113111
}

0 commit comments

Comments
 (0)