Skip to content

Commit

Permalink
source-dependencies/value-class-underlying: fix test
Browse files Browse the repository at this point in the history
We were not testing what we thought we were testing before, because C
used the name "x" which is also the name of the parameter we change in
A, so when we changed A we were invalidating C too. Fixed by using a
different name than "x" in C, which reveals that there is a bug
somewhere since the test doesn't pass anymore.
  • Loading branch information
smarter committed Oct 24, 2017
1 parent 59bc417 commit 35ca0e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions project/Scripted.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ object Scripted {
bufferLog: Boolean,
prescripted: File => Unit): Unit = {
System.err.println(s"About to run tests: ${args.mkString("\n * ", "\n * ", "\n")}")
sys.props(org.apache.logging.log4j.util.LoaderUtil.IGNORE_TCCL_PROPERTY) = "true"
val noJLine = new classpath.FilteredLoader(scriptedSbtInstance.loader, "jline." :: Nil)
val loader = classpath.ClasspathUtilities.toLoader(scriptedSbtClasspath.files, noJLine)
val bridgeClass = Class.forName("sbt.internal.inc.IncScriptedRunner", true, loader)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object C {
def main(args: Array[String]): Unit = {
val x = B.foo
println("x: " + x) // Need to use x in an expression to see if it crashes or not
val duck = B.foo
println("duck: " + duck) // Need to use duck in an expression to see if it crashes or not
}
}

0 comments on commit 35ca0e3

Please sign in to comment.