Skip to content

Commit fa93159

Browse files
Code cleanup
1 parent 3fbbbd9 commit fa93159

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package dotty.tools.dotc
22
package transform
33

44
import java.io.File
5-
import java.util.concurrent.atomic.AtomicInteger
65

76
import ast.tpd.*
87
import collection.mutable
@@ -13,10 +12,10 @@ import core.Symbols.{defn, Symbol}
1312
import core.Constants.Constant
1413
import core.NameOps.isContextFunction
1514
import core.Types.*
15+
import coverage.*
1616
import typer.LiftCoverage
17-
import util.{SourcePosition, Property}
17+
import util.SourcePosition
1818
import util.Spans.Span
19-
import coverage.*
2019
import localopt.StringInterpolatorOpt
2120

2221
/** Implements code coverage by inserting calls to scala.runtime.coverage.Invoker
@@ -43,7 +42,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
4342
val outputPath = ctx.settings.coverageOutputDir.value
4443

4544
// Ensure the dir exists
46-
val dataDir = new File(outputPath)
45+
val dataDir = File(outputPath)
4746
val newlyCreated = dataDir.mkdirs()
4847

4948
if !newlyCreated then
@@ -189,7 +188,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
189188
private def recordStatement(tree: Tree, pos: SourcePosition, branch: Boolean)(using ctx: Context): Int =
190189
val id = statementId
191190
statementId += 1
192-
val statement = new Statement(
191+
val statement = Statement(
193192
source = ctx.source.file.name,
194193
location = Location(tree),
195194
id = id,

0 commit comments

Comments
 (0)