diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/Predef.scala | 6 | ||||
-rwxr-xr-x | src/library/scala/collection/mutable/ArrayBuilder.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedAnyArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedBooleanArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedByteArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedCharArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedDoubleArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedFloatArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedIntArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedLongArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedObjectArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedShortArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedUnitArray.scala | 4 |
14 files changed, 32 insertions, 26 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 7a235bea6c..95d9901575 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -76,6 +76,12 @@ object Predef { val Map = collection.immutable.Map val Set = collection.immutable.Set + type Manifest[T] = scala.reflect.Manifest[T] + type ClassManifest[T] = scala.reflect.ClassManifest[T] + def evidence[T](implicit e: T) = e + def manifest[T](implicit m: Manifest[T]) = m + def classManifest[T](implicit m: ClassManifest[T]) = m + // will soon stop being a view: subsumed by `conforms` (which is less likely to give rise to ambiguities) // @see `conforms` for the implicit version implicit def identity[A](x: A): A = x diff --git a/src/library/scala/collection/mutable/ArrayBuilder.scala b/src/library/scala/collection/mutable/ArrayBuilder.scala index 6932fb77ea..060227a327 100755 --- a/src/library/scala/collection/mutable/ArrayBuilder.scala +++ b/src/library/scala/collection/mutable/ArrayBuilder.scala @@ -12,11 +12,11 @@ package scala.collection.mutable import scala.collection.generic._ -import scala.reflect.Manifest +import scala.reflect.ClassManifest import scala.runtime.BoxedArray /** A builder class for arrays */ -class ArrayBuilder[A](manifest: Manifest[A]) extends Builder[A, BoxedArray[A]] { +class ArrayBuilder[A](manifest: ClassManifest[A]) extends Builder[A, BoxedArray[A]] { private var elems: BoxedArray[A] = _ private var capacity: Int = 0 diff --git a/src/library/scala/runtime/BoxedAnyArray.scala b/src/library/scala/runtime/BoxedAnyArray.scala index 78221e128c..6ebccdca7d 100644 --- a/src/library/scala/runtime/BoxedAnyArray.scala +++ b/src/library/scala/runtime/BoxedAnyArray.scala @@ -10,7 +10,7 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest import compat.Platform /** @@ -22,7 +22,7 @@ import compat.Platform @serializable final class BoxedAnyArray[A](val length: Int) extends BoxedArray[A] { - def elemManifest: Manifest[A] = null + def elemManifest: ClassManifest[A] = null private var boxed = new Array[AnyRef](length) // private val hash = boxed.hashCode() diff --git a/src/library/scala/runtime/BoxedArray.scala b/src/library/scala/runtime/BoxedArray.scala index 6cac7f1113..7c7798d866 100644 --- a/src/library/scala/runtime/BoxedArray.scala +++ b/src/library/scala/runtime/BoxedArray.scala @@ -12,7 +12,7 @@ package scala.runtime import Predef._ -import scala.reflect.Manifest +import scala.reflect.ClassManifest import collection.mutable.{Vector, ArrayBuilder, ArrayBuffer} import collection.generic._ import collection.Sequence @@ -26,7 +26,7 @@ import collection.Sequence abstract class BoxedArray[A] extends Vector[A] with VectorTemplate[A, BoxedArray[A]] with Boxed { self => /** The manifest of the element type */ - def elemManifest: Manifest[A] + def elemManifest: ClassManifest[A] /** The length of the array */ def length: Int diff --git a/src/library/scala/runtime/BoxedBooleanArray.scala b/src/library/scala/runtime/BoxedBooleanArray.scala index 876357f410..ff781004d4 100644 --- a/src/library/scala/runtime/BoxedBooleanArray.scala +++ b/src/library/scala/runtime/BoxedBooleanArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedBooleanArray(val value: Array[Boolean]) extends BoxedArray[Boolean] { - def elemManifest = Manifest.Boolean + def elemManifest = ClassManifest.Boolean def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedByteArray.scala b/src/library/scala/runtime/BoxedByteArray.scala index 49b318bfdd..9f81dc2a86 100644 --- a/src/library/scala/runtime/BoxedByteArray.scala +++ b/src/library/scala/runtime/BoxedByteArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedByteArray(val value: Array[Byte]) extends BoxedArray[Byte] { - def elemManifest = Manifest.Byte + def elemManifest = ClassManifest.Byte def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedCharArray.scala b/src/library/scala/runtime/BoxedCharArray.scala index df62d4c129..8924ed52f5 100644 --- a/src/library/scala/runtime/BoxedCharArray.scala +++ b/src/library/scala/runtime/BoxedCharArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedCharArray(val value: Array[Char]) extends BoxedArray[Char] { - def elemManifest = Manifest.Char + def elemManifest = ClassManifest.Char def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedDoubleArray.scala b/src/library/scala/runtime/BoxedDoubleArray.scala index 91d37778b4..2a9a657915 100644 --- a/src/library/scala/runtime/BoxedDoubleArray.scala +++ b/src/library/scala/runtime/BoxedDoubleArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedDoubleArray(val value: Array[Double]) extends BoxedArray[Double] { - def elemManifest = Manifest.Double + def elemManifest = ClassManifest.Double def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedFloatArray.scala b/src/library/scala/runtime/BoxedFloatArray.scala index 74891cd217..038356150e 100644 --- a/src/library/scala/runtime/BoxedFloatArray.scala +++ b/src/library/scala/runtime/BoxedFloatArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedFloatArray(val value: Array[Float]) extends BoxedArray[Float] { - def elemManifest = Manifest.Float + def elemManifest = ClassManifest.Float def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedIntArray.scala b/src/library/scala/runtime/BoxedIntArray.scala index 2eff82f6b5..fac3b24b77 100644 --- a/src/library/scala/runtime/BoxedIntArray.scala +++ b/src/library/scala/runtime/BoxedIntArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedIntArray(val value: Array[Int]) extends BoxedArray[Int] { - def elemManifest = Manifest.Int + def elemManifest = ClassManifest.Int def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedLongArray.scala b/src/library/scala/runtime/BoxedLongArray.scala index 5aaab0b654..cbf9d68498 100644 --- a/src/library/scala/runtime/BoxedLongArray.scala +++ b/src/library/scala/runtime/BoxedLongArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedLongArray(val value: Array[Long]) extends BoxedArray[Long] { - def elemManifest = Manifest.Long + def elemManifest = ClassManifest.Long def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedObjectArray.scala b/src/library/scala/runtime/BoxedObjectArray.scala index 6c1c1abe9c..c778a9291b 100644 --- a/src/library/scala/runtime/BoxedObjectArray.scala +++ b/src/library/scala/runtime/BoxedObjectArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest import Predef._ @serializable -final class BoxedObjectArray[A <: AnyRef](val value: Array[AnyRef], val elemManifest: Manifest[A]) extends BoxedArray[A] { +final class BoxedObjectArray[A <: AnyRef](val value: Array[AnyRef], val elemManifest: ClassManifest[A]) extends BoxedArray[A] { def this(value: Array[AnyRef]) = this(value, null) // !!! todo: remove diff --git a/src/library/scala/runtime/BoxedShortArray.scala b/src/library/scala/runtime/BoxedShortArray.scala index ec1fe36664..4da6b0c1c9 100644 --- a/src/library/scala/runtime/BoxedShortArray.scala +++ b/src/library/scala/runtime/BoxedShortArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedShortArray(val value: Array[Short]) extends BoxedArray[Short] { - def elemManifest = Manifest.Short + def elemManifest = ClassManifest.Short def length: Int = value.length diff --git a/src/library/scala/runtime/BoxedUnitArray.scala b/src/library/scala/runtime/BoxedUnitArray.scala index 75109b612b..0d427bd7d2 100644 --- a/src/library/scala/runtime/BoxedUnitArray.scala +++ b/src/library/scala/runtime/BoxedUnitArray.scala @@ -10,12 +10,12 @@ package scala.runtime -import scala.reflect.Manifest +import scala.reflect.ClassManifest @serializable final class BoxedUnitArray(val value: Array[Unit]) extends BoxedArray[Unit] { - def elemManifest = Manifest.Unit + def elemManifest = ClassManifest.Unit def length: Int = value.length |