diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-14 12:27:53 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-03-14 12:27:53 -0700 |
commit | a127aae2a5fbae146ea81e470541209436222970 (patch) | |
tree | 75b8a7d3362896fd6562eac321b239326296b48a /src/library | |
parent | 0c9ffe55c774de261d32f36cc29b954638e86574 (diff) | |
parent | 5b562d4e7e451156236b48b3591db980a5691f8d (diff) | |
download | scala-a127aae2a5fbae146ea81e470541209436222970.tar.gz scala-a127aae2a5fbae146ea81e470541209436222970.tar.bz2 scala-a127aae2a5fbae146ea81e470541209436222970.zip |
Merge branch 'merge-inline' of /scratch/trunk3 into develop
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/AnyVal.scala | 6 | ||||
-rw-r--r-- | src/library/scala/Boolean.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Byte.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Char.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Double.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Float.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Int.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Long.scala | 2 | ||||
-rw-r--r-- | src/library/scala/NotNull.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Proxy.scala | 10 | ||||
-rw-r--r-- | src/library/scala/ScalaObject.scala | 13 | ||||
-rw-r--r-- | src/library/scala/Short.scala | 2 | ||||
-rw-r--r-- | src/library/scala/Unit.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/GenTraversableOnce.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/immutable/StringOps.scala | 2 | ||||
-rw-r--r-- | src/library/scala/math/Ordered.scala | 2 | ||||
-rw-r--r-- | src/library/scala/runtime/ScalaNumberProxy.scala | 2 | ||||
-rw-r--r-- | src/library/scala/util/Properties.scala | 2 |
18 files changed, 26 insertions, 35 deletions
diff --git a/src/library/scala/AnyVal.scala b/src/library/scala/AnyVal.scala index cd2c04dbd8..393f0899f4 100644 --- a/src/library/scala/AnyVal.scala +++ b/src/library/scala/AnyVal.scala @@ -25,4 +25,8 @@ package scala * The ''integer types'' include the subrange types as well as [[scala.Int]] and [[scala.Long]]. * The ''floating point types'' are [[scala.Float]] and [[scala.Double]]. */ -sealed trait AnyVal +abstract class AnyVal extends Any with NotNull { + // disabled for now to make the standard build go through. + // Once we have a new strap we can uncomment this and delete the AnyVal_getClass entry in Definitions. + def getClass(): Class[_ <: AnyVal] = ??? +} diff --git a/src/library/scala/Boolean.scala b/src/library/scala/Boolean.scala index 0adcde3aba..5078e59d28 100644 --- a/src/library/scala/Boolean.scala +++ b/src/library/scala/Boolean.scala @@ -107,7 +107,7 @@ final class Boolean extends AnyVal { */ def ^(x: Boolean): Boolean = sys.error("stub") - def getClass(): Class[Boolean] = sys.error("stub") + override def getClass(): Class[Boolean] = sys.error("stub") } object Boolean extends AnyValCompanion { diff --git a/src/library/scala/Byte.scala b/src/library/scala/Byte.scala index 4923cc9786..f9c5f6003e 100644 --- a/src/library/scala/Byte.scala +++ b/src/library/scala/Byte.scala @@ -590,7 +590,7 @@ final class Byte extends AnyVal { */ def %(x: Double): Double = sys.error("stub") - def getClass(): Class[Byte] = sys.error("stub") + override def getClass(): Class[Byte] = sys.error("stub") } object Byte extends AnyValCompanion { diff --git a/src/library/scala/Char.scala b/src/library/scala/Char.scala index b4e6445899..3d459782cd 100644 --- a/src/library/scala/Char.scala +++ b/src/library/scala/Char.scala @@ -590,7 +590,7 @@ final class Char extends AnyVal { */ def %(x: Double): Double = sys.error("stub") - def getClass(): Class[Char] = sys.error("stub") + override def getClass(): Class[Char] = sys.error("stub") } object Char extends AnyValCompanion { diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala index 68a1a01299..01414265c4 100644 --- a/src/library/scala/Double.scala +++ b/src/library/scala/Double.scala @@ -356,7 +356,7 @@ final class Double extends AnyVal { */ def %(x: Double): Double = sys.error("stub") - def getClass(): Class[Double] = sys.error("stub") + override def getClass(): Class[Double] = sys.error("stub") } object Double extends AnyValCompanion { diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala index 709d73d408..ff5b3cb112 100644 --- a/src/library/scala/Float.scala +++ b/src/library/scala/Float.scala @@ -356,7 +356,7 @@ final class Float extends AnyVal { */ def %(x: Double): Double = sys.error("stub") - def getClass(): Class[Float] = sys.error("stub") + override def getClass(): Class[Float] = sys.error("stub") } object Float extends AnyValCompanion { diff --git a/src/library/scala/Int.scala b/src/library/scala/Int.scala index 519a0486ac..316bbced2d 100644 --- a/src/library/scala/Int.scala +++ b/src/library/scala/Int.scala @@ -590,7 +590,7 @@ final class Int extends AnyVal { */ def %(x: Double): Double = sys.error("stub") - def getClass(): Class[Int] = sys.error("stub") + override def getClass(): Class[Int] = sys.error("stub") } object Int extends AnyValCompanion { diff --git a/src/library/scala/Long.scala b/src/library/scala/Long.scala index 9c7a803f08..ce8618c22a 100644 --- a/src/library/scala/Long.scala +++ b/src/library/scala/Long.scala @@ -590,7 +590,7 @@ final class Long extends AnyVal { */ def %(x: Double): Double = sys.error("stub") - def getClass(): Class[Long] = sys.error("stub") + override def getClass(): Class[Long] = sys.error("stub") } object Long extends AnyValCompanion { diff --git a/src/library/scala/NotNull.scala b/src/library/scala/NotNull.scala index d47d47a83e..64f999a932 100644 --- a/src/library/scala/NotNull.scala +++ b/src/library/scala/NotNull.scala @@ -6,12 +6,10 @@ ** |/ ** \* */ - - package scala /** * A marker trait for things that are not allowed to be null * @since 2.5 */ -trait NotNull {} +trait NotNull extends Any {} diff --git a/src/library/scala/Proxy.scala b/src/library/scala/Proxy.scala index 383ff5b3bb..604b2a299f 100644 --- a/src/library/scala/Proxy.scala +++ b/src/library/scala/Proxy.scala @@ -22,13 +22,15 @@ package scala * @author Matthias Zenger * @version 1.0, 26/04/2004 */ -trait Proxy { +trait Proxy extends Any { def self: Any override def hashCode: Int = self.hashCode override def equals(that: Any): Boolean = that match { - case null => false - case x: AnyRef => (x eq this) || (x eq self.asInstanceOf[AnyRef]) || (x equals self) + case null => false + case _ => + val x = that.asInstanceOf[AnyRef] + (x eq this.asInstanceOf[AnyRef]) || (x eq self.asInstanceOf[AnyRef]) || (x equals self) } override def toString = "" + self } @@ -36,7 +38,7 @@ trait Proxy { object Proxy { /** A proxy which exposes the type it is proxying for via a type parameter. */ - trait Typed[T] extends Proxy { + trait Typed[T] extends Any with Proxy { def self: T } } diff --git a/src/library/scala/ScalaObject.scala b/src/library/scala/ScalaObject.scala deleted file mode 100644 index 8da0ab2cba..0000000000 --- a/src/library/scala/ScalaObject.scala +++ /dev/null @@ -1,13 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - - - -package scala - -trait ScalaObject extends java.lang.Object diff --git a/src/library/scala/Short.scala b/src/library/scala/Short.scala index a9210d3555..5664c3b44c 100644 --- a/src/library/scala/Short.scala +++ b/src/library/scala/Short.scala @@ -590,7 +590,7 @@ final class Short extends AnyVal { */ def %(x: Double): Double = sys.error("stub") - def getClass(): Class[Short] = sys.error("stub") + override def getClass(): Class[Short] = sys.error("stub") } object Short extends AnyValCompanion { diff --git a/src/library/scala/Unit.scala b/src/library/scala/Unit.scala index 57970b021b..f6ed0121ab 100644 --- a/src/library/scala/Unit.scala +++ b/src/library/scala/Unit.scala @@ -17,7 +17,7 @@ package scala * method which is declared `void`. */ final class Unit extends AnyVal { - def getClass(): Class[Unit] = sys.error("stub") + override def getClass(): Class[Unit] = sys.error("stub") } object Unit extends AnyValCompanion { diff --git a/src/library/scala/collection/GenTraversableOnce.scala b/src/library/scala/collection/GenTraversableOnce.scala index 305f8d768d..18b1a96155 100644 --- a/src/library/scala/collection/GenTraversableOnce.scala +++ b/src/library/scala/collection/GenTraversableOnce.scala @@ -41,7 +41,7 @@ package scala.collection * @author Aleksandar Prokopec * @since 2.9 */ -trait GenTraversableOnce[+A] { +trait GenTraversableOnce[+A] extends AnyRef { def foreach[U](f: A => U): Unit diff --git a/src/library/scala/collection/immutable/StringOps.scala b/src/library/scala/collection/immutable/StringOps.scala index 8612357db9..09cbd247e9 100644 --- a/src/library/scala/collection/immutable/StringOps.scala +++ b/src/library/scala/collection/immutable/StringOps.scala @@ -28,7 +28,7 @@ import mutable.StringBuilder * @define Coll StringOps * @define coll string */ -final class StringOps(override val repr: String) extends StringLike[String] { +final class StringOps(override val repr: String) extends AnyRef with StringLike[String] { override protected[this] def thisCollection: WrappedString = new WrappedString(repr) override protected[this] def toCollection(repr: String): WrappedString = new WrappedString(repr) diff --git a/src/library/scala/math/Ordered.scala b/src/library/scala/math/Ordered.scala index 53d618db63..4397f14c94 100644 --- a/src/library/scala/math/Ordered.scala +++ b/src/library/scala/math/Ordered.scala @@ -50,7 +50,7 @@ package scala.math * @author Martin Odersky * @version 1.1, 2006-07-24 */ -trait Ordered[A] extends java.lang.Comparable[A] { +trait Ordered[A] extends /*Any with*/ java.lang.Comparable[A] { /** Result of comparing `this` with operand `that`. * diff --git a/src/library/scala/runtime/ScalaNumberProxy.scala b/src/library/scala/runtime/ScalaNumberProxy.scala index 09e1611dcd..bd19e099e0 100644 --- a/src/library/scala/runtime/ScalaNumberProxy.scala +++ b/src/library/scala/runtime/ScalaNumberProxy.scala @@ -64,7 +64,7 @@ abstract class FractionalProxy[T : Fractional] extends ScalaNumberProxy[T] with def to(end: T, step: T): NumericRange.Inclusive[T] = NumericRange.inclusive(self, end, step) } -trait OrderedProxy[T] extends Typed[T] with Ordered[T] { +trait OrderedProxy[T] extends Ordered[T] with Typed[T] { protected def ord: Ordering[T] def compare(y: T) = ord.compare(self, y) diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala index a62d74b1f6..0c7772cd07 100644 --- a/src/library/scala/util/Properties.scala +++ b/src/library/scala/util/Properties.scala @@ -15,7 +15,7 @@ import java.util.jar.Attributes.{ Name => AttributeName } /** Loads `library.properties` from the jar. */ object Properties extends PropertiesTrait { protected def propCategory = "library" - protected def pickJarBasedOn = classOf[ScalaObject] + protected def pickJarBasedOn = classOf[Option[_]] /** Scala manifest attributes. */ |