Skip to content

Commit 16d11bd

Browse files
committed
Upgrade Scala and Scala-JS versions in build and Travis configuration.
Scala: - 2.11.8 -> 2.11.11 - 2.12.1 -> 2.12.3 Scala-JS: - 0.6.13 -> 0.6.19
2 parents 715d76b + 1154886 commit 16d11bd

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ matrix:
88
- jdk: oraclejdk7
99
scala: 2.10.6
1010
- jdk: oraclejdk7
11-
scala: 2.11.8
11+
scala: 2.11.11
1212
- jdk: oraclejdk8
13-
scala: 2.12.0
13+
scala: 2.12.3
1414

1515
before_cache:
1616
- find "$HOME/.sbt/" -name '*.lock' -print0 | xargs -0 rm

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ val ScalatestVersion = "3.0.0"
1212

1313
val appSettings = Seq(
1414
organization := Org,
15-
scalaVersion := "2.12.0",
16-
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0"),
15+
scalaVersion := "2.12.3",
16+
crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.3"),
1717
fork in Test := false,
1818
publishMavenStyle := true,
1919
publishArtifact in Test := false,

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1")
44

55
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
66

7-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
7+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.19")

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,6 @@ class ScoverageInstrumentationComponent(val global: Global, extraAfterPhase: Opt
581581

582582
case _: TypeTree => super.transform(tree)
583583

584-
// if the rhs of a val is a literal we can just leave it
585-
case v: ValDef if v.rhs.isInstanceOf[Literal] => tree
586-
587584
/**
588585
* We can ignore lazy val defs as they are implemented by a generated defdef
589586
*/
@@ -602,6 +599,7 @@ class ScoverageInstrumentationComponent(val global: Global, extraAfterPhase: Opt
602599

603600
// we need to remove the final mod so that we keep the code in order to check its invoked
604601
case v: ValDef if v.mods.isFinal =>
602+
updateLocation(v)
605603
treeCopy.ValDef(v, v.mods.&~(ModifierFlags.FINAL), v.name, v.tpt, process(v.rhs))
606604

607605
/**

scalac-scoverage-plugin/src/test/scala/scoverage/PluginCoverageTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class PluginCoverageTest
2323
// we expect:
2424
// instrumenting the default-param which becomes a method call invocation
2525
// the method makeGreeting is entered.
26-
compiler.assertNMeasuredStatements(1)
26+
compiler.assertNMeasuredStatements(2)
2727
}
2828

2929
test("scoverage should skip macros") {
@@ -68,7 +68,7 @@ class PluginCoverageTest
6868
|} """.stripMargin)
6969
assert(!compiler.reporter.hasErrors)
7070
// we should have 3 statements - initialising the val, executing println, and executing the parameter
71-
compiler.assertNMeasuredStatements(7)
71+
compiler.assertNMeasuredStatements(8)
7272
}
7373

7474
test("scoverage should not instrument the match as a statement") {

0 commit comments

Comments
 (0)