Skip to content

Commit 474948a

Browse files
committed
Fixes
1 parent 90b264b commit 474948a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/coverage/Serializer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ object Serializer:
110110
fullClassName,
111111
classType,
112112
method,
113-
sourceRoot.resolve(sourcePath)
113+
sourceRoot.resolve(sourcePath).normalize()
114114
)
115115
val start: Int = lines.next().toInt
116116
val end: Int = lines.next().toInt

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
275275
InstrumentedParts.singleExprTree(coverageCall, transformed)
276276

277277
override def transform(tree: Tree)(using Context): Tree =
278-
lastCompiledFiles += tree.sourcePos.source.file.absolute.jpath.toString
278+
val path = tree.sourcePos.source.file.absolute.jpath
279+
if path != null then lastCompiledFiles += path.toString
280+
279281
inContext(transformCtx(tree)) { // necessary to position inlined code properly
280282
tree match
281283
// simple cases

0 commit comments

Comments
 (0)