summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-04-23 16:09:16 -0700
committerPaul Phillips <paulp@improving.org>2013-04-23 16:30:31 -0700
commitcdffcf8962c9fa606c027fcb5a50a4273976a576 (patch)
treefe2c5f908f92f26f9fa8def47f1c99bb9cbddcb4 /src/library
parent1da48a45b62879c2bd2904342eeff7e6e568350a (diff)
downloadscala-cdffcf8962c9fa606c027fcb5a50a4273976a576.tar.gz
scala-cdffcf8962c9fa606c027fcb5a50a4273976a576.tar.bz2
scala-cdffcf8962c9fa606c027fcb5a50a4273976a576.zip
Eliminated the accumulated feature warnings.
No, this isn't busywork, how dare you suggest such a thing. I intend my tombstone to say HERE LIES EXTEMPORE, WHO ELIMINATED A LOT OF SIP-18 WARNINGS REST IN PEACE
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/collection/Searching.scala5
-rw-r--r--src/library/scala/concurrent/duration/Duration.scala1
-rw-r--r--src/library/scala/concurrent/impl/ExecutionContextImpl.scala10
3 files changed, 9 insertions, 7 deletions
diff --git a/src/library/scala/collection/Searching.scala b/src/library/scala/collection/Searching.scala
index 03eb4283ad..8957771988 100644
--- a/src/library/scala/collection/Searching.scala
+++ b/src/library/scala/collection/Searching.scala
@@ -8,6 +8,7 @@
package scala.collection
+import scala.language.implicitConversions
import scala.annotation.tailrec
import scala.collection.generic.IsSeqLike
import scala.math.Ordering
@@ -50,7 +51,7 @@ object Searching {
* sequence, or the `InsertionPoint` where the element would be inserted if
* the element is not in the sequence.
*/
- final def search[B >: A](elem: B)(implicit ord: Ordering[B]): SearchResult =
+ final def search[B >: A](elem: B)(implicit ord: Ordering[B]): SearchResult =
coll match {
case _: IndexedSeq[A] => binarySearch(elem, -1, coll.length)(ord)
case _ => linearSearch(coll.view, elem, 0)(ord)
@@ -77,7 +78,7 @@ object Searching {
* the element is not in the sequence.
*/
final def search[B >: A](elem: B, from: Int, to: Int)
- (implicit ord: Ordering[B]): SearchResult =
+ (implicit ord: Ordering[B]): SearchResult =
coll match {
case _: IndexedSeq[A] => binarySearch(elem, from-1, to)(ord)
case _ => linearSearch(coll.view(from, to), elem, from)(ord)
diff --git a/src/library/scala/concurrent/duration/Duration.scala b/src/library/scala/concurrent/duration/Duration.scala
index 6c6155279d..cbc31a7eed 100644
--- a/src/library/scala/concurrent/duration/Duration.scala
+++ b/src/library/scala/concurrent/duration/Duration.scala
@@ -10,6 +10,7 @@ package scala.concurrent.duration
import java.lang.{ Double => JDouble, Long => JLong }
import scala.language.implicitConversions
+import scala.language.postfixOps
object Duration {
diff --git a/src/library/scala/concurrent/impl/ExecutionContextImpl.scala b/src/library/scala/concurrent/impl/ExecutionContextImpl.scala
index e4a0f464f9..ed04293e0d 100644
--- a/src/library/scala/concurrent/impl/ExecutionContextImpl.scala
+++ b/src/library/scala/concurrent/impl/ExecutionContextImpl.scala
@@ -30,7 +30,7 @@ private[scala] class ExecutionContextImpl private[impl] (es: Executor, reporter:
}
// Implement BlockContext on FJP threads
- class DefaultThreadFactory(daemonic: Boolean) extends ThreadFactory with ForkJoinPool.ForkJoinWorkerThreadFactory {
+ class DefaultThreadFactory(daemonic: Boolean) extends ThreadFactory with ForkJoinPool.ForkJoinWorkerThreadFactory {
def wire[T <: Thread](thread: T): T = {
thread.setDaemon(daemonic)
thread.setUncaughtExceptionHandler(uncaughtExceptionHandler)
@@ -72,7 +72,7 @@ private[scala] class ExecutionContextImpl private[impl] (es: Executor, reporter:
getInt("scala.concurrent.context.maxThreads", _.toInt))
val threadFactory = new DefaultThreadFactory(daemonic = true)
-
+
try {
new ForkJoinPool(
desiredParallelism,
@@ -98,13 +98,13 @@ private[scala] class ExecutionContextImpl private[impl] (es: Executor, reporter:
def execute(runnable: Runnable): Unit = executor match {
case fj: ForkJoinPool =>
- val fjt = runnable match {
+ val fjt: ForkJoinTask[_] = runnable match {
case t: ForkJoinTask[_] => t
- case r => new ExecutionContextImpl.AdaptedForkJoinTask(r)
+ case r => new ExecutionContextImpl.AdaptedForkJoinTask(r)
}
Thread.currentThread match {
case fjw: ForkJoinWorkerThread if fjw.getPool eq fj => fjt.fork()
- case _ => fj execute fjt
+ case _ => fj execute fjt
}
case generic => generic execute runnable
}