Skip to content

Commit 7641a94

Browse files
committed
Unbreak the build
For some reason, BestEffortTastyWriter does not compile since PlainFile does not have a delete method, only File does.
1 parent 44c1e3a commit 7641a94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/core/tasty/BestEffortTastyWriter.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ object BestEffortTastyWriter:
1818
unit.pickled.foreach { (clz, binary) =>
1919
val parts = clz.fullName.mangledString.split('.')
2020
val outPath = outputPath(parts.toList, dir)
21-
val outTastyFile = new PlainFile(new File(outPath))
21+
val file = new File(outPath)
22+
val outTastyFile = new PlainFile(file)
2223
val outstream = new DataOutputStream(outTastyFile.bufferedOutput)
2324
try outstream.write(binary())
2425
catch case ex: ClosedByInterruptException =>
2526
try
26-
outTastyFile.delete() // don't leave an empty or half-written tastyfile around after an interrupt
27+
file.delete() // don't leave an empty or half-written tastyfile around after an interrupt
2728
catch
2829
case _: Throwable =>
2930
throw ex

0 commit comments

Comments
 (0)