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 {
24
24
var os : OutputStream = null
25
25
var ps : PrintStream = null
26
26
try {
27
- os = File (outputDir + " .decompiled" ).outputStream()
27
+ os = File (outputDir + " .decompiled" ).outputStream(append = true )
28
28
ps = new PrintStream (os)
29
29
printToOutput(ps)
30
30
} finally {
Original file line number Diff line number Diff line change 1
1
package dotty .tools .dotc .decompiler
2
2
3
+ import java .nio .file .{Files , Paths }
4
+
3
5
import dotty .tools .dotc
4
6
import dotty .tools .dotc .core .Contexts ._
5
7
@@ -10,6 +12,9 @@ import dotty.tools.dotc.core.Contexts._
10
12
object Main extends dotc.Driver {
11
13
override protected def newCompiler (implicit ctx : Context ): dotc.Compiler = {
12
14
assert(ctx.settings.fromTasty.value)
15
+ val outputDir = ctx.settings.outputDir.value
16
+ if (outputDir != " ." )
17
+ Files .deleteIfExists(Paths .get(outputDir + " .decompiled" ))
13
18
new TASTYDecompiler
14
19
}
15
20
You can’t perform that action at this time.
0 commit comments