@@ -2,7 +2,6 @@ package dotty.tools.dotc
2
2
package transform
3
3
4
4
import java .io .File
5
- import java .util .concurrent .atomic .AtomicInteger
6
5
7
6
import ast .tpd .*
8
7
import collection .mutable
@@ -13,10 +12,10 @@ import core.Symbols.{defn, Symbol}
13
12
import core .Constants .Constant
14
13
import core .NameOps .isContextFunction
15
14
import core .Types .*
15
+ import coverage .*
16
16
import typer .LiftCoverage
17
- import util .{ SourcePosition , Property }
17
+ import util .SourcePosition
18
18
import util .Spans .Span
19
- import coverage .*
20
19
import localopt .StringInterpolatorOpt
21
20
22
21
/** Implements code coverage by inserting calls to scala.runtime.coverage.Invoker
@@ -43,7 +42,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
43
42
val outputPath = ctx.settings.coverageOutputDir.value
44
43
45
44
// Ensure the dir exists
46
- val dataDir = new File (outputPath)
45
+ val dataDir = File (outputPath)
47
46
val newlyCreated = dataDir.mkdirs()
48
47
49
48
if ! newlyCreated then
@@ -189,7 +188,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
189
188
private def recordStatement (tree : Tree , pos : SourcePosition , branch : Boolean )(using ctx : Context ): Int =
190
189
val id = statementId
191
190
statementId += 1
192
- val statement = new Statement (
191
+ val statement = Statement (
193
192
source = ctx.source.file.name,
194
193
location = Location (tree),
195
194
id = id,
0 commit comments