@@ -2,7 +2,6 @@ package dotty.tools.dotc
22package transform
33
44import java .io .File
5- import java .util .concurrent .atomic .AtomicInteger
65
76import ast .tpd .*
87import collection .mutable
@@ -13,10 +12,10 @@ import core.Symbols.{defn, Symbol}
1312import core .Constants .Constant
1413import core .NameOps .isContextFunction
1514import core .Types .*
15+ import coverage .*
1616import typer .LiftCoverage
17- import util .{ SourcePosition , Property }
17+ import util .SourcePosition
1818import util .Spans .Span
19- import coverage .*
2019import 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