diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-02-09 15:46:47 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-02-09 15:46:47 +0000 |
commit | d5fbd26715a9084595b605a6b2bfd24cd6f2b66e (patch) | |
tree | f3f28e5a2a1b6b7fafe5843e2b367e48eb02b254 /src/library | |
parent | 75667b88b379744d4eb33bae49c5120a54fa1f8f (diff) | |
download | scala-d5fbd26715a9084595b605a6b2bfd24cd6f2b66e.tar.gz scala-d5fbd26715a9084595b605a6b2bfd24cd6f2b66e.tar.bz2 scala-d5fbd26715a9084595b605a6b2bfd24cd6f2b66e.zip |
Changed AnyCompanion to SpecializableCompanion.
Fixed a couple of term specialization bugs.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/AnyValCompanion.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Predef.scala | 2 | ||||
-rw-r--r-- | src/library/scala/SpecializableCompanion.scala (renamed from src/library/scala/AnyCompanion.scala) | 4 | ||||
-rw-r--r-- | src/library/scala/specialized.scala | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/library/scala/AnyValCompanion.scala b/src/library/scala/AnyValCompanion.scala index 3ddd66c2d0..d6cb498185 100644 --- a/src/library/scala/AnyValCompanion.scala +++ b/src/library/scala/AnyValCompanion.scala @@ -18,4 +18,4 @@ package scala * }}} * */ -private[scala] trait AnyValCompanion extends AnyCompanion { } +private[scala] trait AnyValCompanion extends SpecializableCompanion { } diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 99953130d3..06ad659c68 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -38,7 +38,7 @@ object Predef extends LowPriorityImplicits { type Set[A] = immutable.Set[A] val Map = immutable.Map val Set = immutable.Set - val AnyRef = new AnyCompanion {} // a dummy used by the specialization annotation + val AnyRef = new SpecializableCompanion {} // a dummy used by the specialization annotation // Manifest types, companions, and incantations for summoning type ClassManifest[T] = scala.reflect.ClassManifest[T] diff --git a/src/library/scala/AnyCompanion.scala b/src/library/scala/SpecializableCompanion.scala index d34e7bc461..fbdf42fd0b 100644 --- a/src/library/scala/AnyCompanion.scala +++ b/src/library/scala/SpecializableCompanion.scala @@ -8,6 +8,6 @@ package scala -/** A common supertype for companion classes. +/** A common supertype for companion classes which specialization takes into account. */ -private[scala] trait AnyCompanion +private[scala] trait SpecializableCompanion diff --git a/src/library/scala/specialized.scala b/src/library/scala/specialized.scala index 38ad8c4c9a..3254a0c967 100644 --- a/src/library/scala/specialized.scala +++ b/src/library/scala/specialized.scala @@ -25,7 +25,7 @@ package scala * * @since 2.8 */ -class specialized(types: AnyCompanion*) extends annotation.StaticAnnotation { +class specialized(types: SpecializableCompanion*) extends annotation.StaticAnnotation { def this() { this(Unit, Boolean, Byte, Short, Char, Int, Long, Float, Double) } |