Skip to content

Commit 715d76b

Browse files
authored
Merge pull request scoverage#194 from gslowikowski/improve-try-without-finally-instrumentation
Improve instrumentation of "try" statement without "finally" section
2 parents 8bc8c22 + 88e348b commit 715d76b

File tree

1 file changed

+1
-1
lines changed
  • scalac-scoverage-plugin/src/main/scala/scoverage

1 file changed

+1
-1
lines changed

scalac-scoverage-plugin/src/main/scala/scoverage/plugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ class ScoverageInstrumentationComponent(val global: Global, extraAfterPhase: Opt
570570
treeCopy.Try(tree,
571571
instrument(process(t), t, branch = true),
572572
transformCases(cases),
573-
instrument(process(f), f, branch = true))
573+
if (f.isEmpty) f else instrument(process(f), f, branch = true))
574574

575575
// type aliases, type parameters, abstract types
576576
case t: TypeDef => super.transform(tree)

0 commit comments

Comments
 (0)