diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-10-05 11:35:33 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-10-05 11:35:33 +0200 |
commit | 5435d2b11e9d23c50c5448b7623712f6e647c315 (patch) | |
tree | b1fc98841d6c26171221e66a5d659b39d856bf65 /src/compiler/scala/tools/nsc/Global.scala | |
parent | c3906917675b54e9ac1f248c9fb0fba9fa310f0e (diff) | |
parent | bb3ded3826adbb52b23725a93d6d51fc127b5623 (diff) | |
download | scala-5435d2b11e9d23c50c5448b7623712f6e647c315.tar.gz scala-5435d2b11e9d23c50c5448b7623712f6e647c315.tar.bz2 scala-5435d2b11e9d23c50c5448b7623712f6e647c315.zip |
Merge commit 'bb3ded3' into merge-2.11-to-2.12-oct-5
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 5cb31c1b64..422e2080f0 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -1690,7 +1690,10 @@ class Global(var currentSettings: Settings, var reporter: Reporter) try { val stream = new FileOutputStream(file) printer.setWriter(new PrintWriter(stream, true)) - printer.printClass(cls) + try + printer.printClass(cls) + finally + stream.close() informProgress(s"wrote $file") } catch { case e: IOException => |