File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
compiler/src/dotty/tools/dotc/decompiler Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class DecompilationPrinter extends Phase {
2424 var os : OutputStream = null
2525 var ps : PrintStream = null
2626 try {
27- os = File (outputDir + " .decompiled" ).outputStream()
27+ os = File (outputDir + " .decompiled" ).outputStream(append = true )
2828 ps = new PrintStream (os)
2929 printToOutput(ps)
3030 } finally {
Original file line number Diff line number Diff line change 11package dotty .tools .dotc .decompiler
22
3+ import java .nio .file .{Files , Paths }
4+
35import dotty .tools .dotc
46import dotty .tools .dotc .core .Contexts ._
57
@@ -10,6 +12,9 @@ import dotty.tools.dotc.core.Contexts._
1012object Main extends dotc.Driver {
1113 override protected def newCompiler (implicit ctx : Context ): dotc.Compiler = {
1214 assert(ctx.settings.fromTasty.value)
15+ val outputDir = ctx.settings.outputDir.value
16+ if (outputDir != " ." )
17+ Files .deleteIfExists(Paths .get(outputDir + " .decompiled" ))
1318 new TASTYDecompiler
1419 }
1520
You can’t perform that action at this time.
0 commit comments