From a2e8f9e001356a993da4e01235c12583d97163d3 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 27 May 2013 12:02:45 -0700 Subject: Make all numeric coercions explicit. Optimistically, this is preparation for a day when we don't let numeric types drift with the winds. Even without the optimism it's a good idea. It flushed out an undocumented change in the math package object relative to the methods being forwarded (a type is widened from what is returned in java) so I documented the intentionality of it. Managing type coercions manually is a bit tedious, no doubt, but it's not tedious enough to warrant abandoning type safety just because java did it. --- src/interactive/scala/tools/nsc/interactive/REPL.scala | 2 +- src/interactive/scala/tools/nsc/interactive/tests/Tester.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interactive') diff --git a/src/interactive/scala/tools/nsc/interactive/REPL.scala b/src/interactive/scala/tools/nsc/interactive/REPL.scala index daa1c21c4a..33981771ec 100644 --- a/src/interactive/scala/tools/nsc/interactive/REPL.scala +++ b/src/interactive/scala/tools/nsc/interactive/REPL.scala @@ -165,7 +165,7 @@ object REPL { show(reloadResult) case "reloadAndAskType" :: file :: millis :: Nil => comp.askReload(List(toSourceFile(file)), reloadResult) - Thread.sleep(millis.toInt) + Thread.sleep(millis.toLong) println("ask type now") comp.askLoadedTyped(toSourceFile(file), typedResult) typedResult.get diff --git a/src/interactive/scala/tools/nsc/interactive/tests/Tester.scala b/src/interactive/scala/tools/nsc/interactive/tests/Tester.scala index a678c41718..4390d5dc54 100644 --- a/src/interactive/scala/tools/nsc/interactive/tests/Tester.scala +++ b/src/interactive/scala/tools/nsc/interactive/tests/Tester.scala @@ -26,7 +26,7 @@ class Tester(ntests: Int, inputs: Array[SourceFile], settings: Settings) { while (!res.isComplete && !res.isCancelled) { if (System.currentTimeMillis() > limit) { print("c"); res.cancel() - } else res.get(TIMEOUT) match { + } else res.get(TIMEOUT.toLong) match { case Some(Left(t)) => /**/ if (settings.verbose) println(t) -- cgit v1.2.3