summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-24 06:18:01 +0000
committerPaul Phillips <paulp@improving.org>2011-01-24 06:18:01 +0000
commit4253124eecba6bed38f1dc961c5c4ee39a29f730 (patch)
tree797f007d753da349feb718f802c476557c47249e /src/library
parent1cbe06c2dcde9606c3d3f6fe86e89fbba3a404e3 (diff)
downloadscala-4253124eecba6bed38f1dc961c5c4ee39a29f730.tar.gz
scala-4253124eecba6bed38f1dc961c5c4ee39a29f730.tar.bz2
scala-4253124eecba6bed38f1dc961c5c4ee39a29f730.zip
The AnyVal types become source files instead of...
The AnyVal types become source files instead of polite compiler fictions. !! You'll need a serious "ant all.clean" now. !! As of this commit the system is fully bootstrapped and the synthetic code eliminated: only the source files remain. The sort-of-AnyVal-companions in scala.runtime.* have all been eliminated because the actual companions can do everything; deprecated vals in the scala.runtime package object point to the companions. This left AnyValCompanion as the only AnyVal related thing in the runtime package: that made little sense, so I deprecated and moved it as well. Starr is based on r24066 plus this commit. Closes #4121. Review by rytz, odersky.
Diffstat (limited to 'src/library')
-rwxr-xr-xsrc/library/scala/AnyVal.scala11
-rw-r--r--src/library/scala/AnyValCompanion.scala21
-rwxr-xr-xsrc/library/scala/Boolean.scala34
-rw-r--r--src/library/scala/Byte.scala154
-rw-r--r--src/library/scala/Char.scala154
-rw-r--r--src/library/scala/Double.scala137
-rw-r--r--src/library/scala/Float.scala137
-rw-r--r--src/library/scala/Int.scala154
-rw-r--r--src/library/scala/Long.scala154
-rw-r--r--src/library/scala/Short.scala154
-rwxr-xr-xsrc/library/scala/Unit.scala23
-rw-r--r--src/library/scala/runtime/AnyValCompanion.scala78
-rw-r--r--src/library/scala/runtime/package.scala13
-rw-r--r--src/library/scala/specialized.scala2
14 files changed, 1150 insertions, 76 deletions
diff --git a/src/library/scala/AnyVal.scala b/src/library/scala/AnyVal.scala
new file mode 100755
index 0000000000..4b4b6038d1
--- /dev/null
+++ b/src/library/scala/AnyVal.scala
@@ -0,0 +1,11 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+package scala
+
+sealed trait AnyVal
diff --git a/src/library/scala/AnyValCompanion.scala b/src/library/scala/AnyValCompanion.scala
new file mode 100644
index 0000000000..854a63e865
--- /dev/null
+++ b/src/library/scala/AnyValCompanion.scala
@@ -0,0 +1,21 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+package scala
+
+/** A common supertype for companion classes of primitive types.
+ *
+ * A common trait for /companion/ objects of primitive types comes handy
+ * when parameterizing code on types. For instance, the specialized
+ * annotation is passed a sequence of types on which to specialize:
+ * {{{
+ * class Tuple1[@specialized(Unit, Int, Double) T]
+ * }}}
+ *
+ */
+private[scala] trait AnyValCompanion { }
diff --git a/src/library/scala/Boolean.scala b/src/library/scala/Boolean.scala
new file mode 100755
index 0000000000..d5e9eb950e
--- /dev/null
+++ b/src/library/scala/Boolean.scala
@@ -0,0 +1,34 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+final class Boolean extends AnyVal {
+ def unary_! : Boolean = sys.error("stub")
+
+ def ==(x: Boolean): Boolean = sys.error("stub")
+ def !=(x: Boolean): Boolean = sys.error("stub")
+ def ||(x: Boolean): Boolean = sys.error("stub")
+ def &&(x: Boolean): Boolean = sys.error("stub")
+ // Compiler won't build with these seemingly more accurate signatures
+ // def ||(x: => Boolean): Boolean = sys.error("stub")
+ // def &&(x: => Boolean): Boolean = sys.error("stub")
+ def |(x: Boolean): Boolean = sys.error("stub")
+ def &(x: Boolean): Boolean = sys.error("stub")
+ def ^(x: Boolean): Boolean = sys.error("stub")
+}
+
+object Boolean extends AnyValCompanion {
+ override def toString = "object scala.Boolean"
+ def box(x: Boolean): jl.Boolean = jl.Boolean.valueOf(x)
+ def unbox(x: jl.Object): Boolean = x.asInstanceOf[jl.Boolean].booleanValue()
+} \ No newline at end of file
diff --git a/src/library/scala/Byte.scala b/src/library/scala/Byte.scala
new file mode 100644
index 0000000000..e3f4a82003
--- /dev/null
+++ b/src/library/scala/Byte.scala
@@ -0,0 +1,154 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+
+final class Byte extends AnyVal {
+ def toByte: Byte = sys.error("stub")
+ def toShort: Short = sys.error("stub")
+ def toChar: Char = sys.error("stub")
+ def toInt: Int = sys.error("stub")
+ def toLong: Long = sys.error("stub")
+ def toFloat: Float = sys.error("stub")
+ def toDouble: Double = sys.error("stub")
+
+ def unary_+ : Int = sys.error("stub")
+ def unary_- : Int = sys.error("stub")
+ def unary_~ : Int = sys.error("stub")
+
+ def +(x: String): String = sys.error("stub")
+
+ def <<(x: Int): Int = sys.error("stub")
+ def <<(x: Long): Int = sys.error("stub")
+ def >>>(x: Int): Int = sys.error("stub")
+ def >>>(x: Long): Int = sys.error("stub")
+ def >>(x: Int): Int = sys.error("stub")
+ def >>(x: Long): Int = sys.error("stub")
+
+ def ==(x: Byte): Boolean = sys.error("stub")
+ def ==(x: Short): Boolean = sys.error("stub")
+ def ==(x: Char): Boolean = sys.error("stub")
+ def ==(x: Int): Boolean = sys.error("stub")
+ def ==(x: Long): Boolean = sys.error("stub")
+ def ==(x: Float): Boolean = sys.error("stub")
+ def ==(x: Double): Boolean = sys.error("stub")
+
+ def !=(x: Byte): Boolean = sys.error("stub")
+ def !=(x: Short): Boolean = sys.error("stub")
+ def !=(x: Char): Boolean = sys.error("stub")
+ def !=(x: Int): Boolean = sys.error("stub")
+ def !=(x: Long): Boolean = sys.error("stub")
+ def !=(x: Float): Boolean = sys.error("stub")
+ def !=(x: Double): Boolean = sys.error("stub")
+
+ def <(x: Byte): Boolean = sys.error("stub")
+ def <(x: Short): Boolean = sys.error("stub")
+ def <(x: Char): Boolean = sys.error("stub")
+ def <(x: Int): Boolean = sys.error("stub")
+ def <(x: Long): Boolean = sys.error("stub")
+ def <(x: Float): Boolean = sys.error("stub")
+ def <(x: Double): Boolean = sys.error("stub")
+
+ def <=(x: Byte): Boolean = sys.error("stub")
+ def <=(x: Short): Boolean = sys.error("stub")
+ def <=(x: Char): Boolean = sys.error("stub")
+ def <=(x: Int): Boolean = sys.error("stub")
+ def <=(x: Long): Boolean = sys.error("stub")
+ def <=(x: Float): Boolean = sys.error("stub")
+ def <=(x: Double): Boolean = sys.error("stub")
+
+ def >(x: Byte): Boolean = sys.error("stub")
+ def >(x: Short): Boolean = sys.error("stub")
+ def >(x: Char): Boolean = sys.error("stub")
+ def >(x: Int): Boolean = sys.error("stub")
+ def >(x: Long): Boolean = sys.error("stub")
+ def >(x: Float): Boolean = sys.error("stub")
+ def >(x: Double): Boolean = sys.error("stub")
+
+ def >=(x: Byte): Boolean = sys.error("stub")
+ def >=(x: Short): Boolean = sys.error("stub")
+ def >=(x: Char): Boolean = sys.error("stub")
+ def >=(x: Int): Boolean = sys.error("stub")
+ def >=(x: Long): Boolean = sys.error("stub")
+ def >=(x: Float): Boolean = sys.error("stub")
+ def >=(x: Double): Boolean = sys.error("stub")
+
+ def |(x: Byte): Int = sys.error("stub")
+ def |(x: Short): Int = sys.error("stub")
+ def |(x: Char): Int = sys.error("stub")
+ def |(x: Int): Int = sys.error("stub")
+ def |(x: Long): Long = sys.error("stub")
+
+ def &(x: Byte): Int = sys.error("stub")
+ def &(x: Short): Int = sys.error("stub")
+ def &(x: Char): Int = sys.error("stub")
+ def &(x: Int): Int = sys.error("stub")
+ def &(x: Long): Long = sys.error("stub")
+
+ def ^(x: Byte): Int = sys.error("stub")
+ def ^(x: Short): Int = sys.error("stub")
+ def ^(x: Char): Int = sys.error("stub")
+ def ^(x: Int): Int = sys.error("stub")
+ def ^(x: Long): Long = sys.error("stub")
+
+ def +(x: Byte): Int = sys.error("stub")
+ def +(x: Short): Int = sys.error("stub")
+ def +(x: Char): Int = sys.error("stub")
+ def +(x: Int): Int = sys.error("stub")
+ def +(x: Long): Long = sys.error("stub")
+ def +(x: Float): Float = sys.error("stub")
+ def +(x: Double): Double = sys.error("stub")
+
+ def -(x: Byte): Int = sys.error("stub")
+ def -(x: Short): Int = sys.error("stub")
+ def -(x: Char): Int = sys.error("stub")
+ def -(x: Int): Int = sys.error("stub")
+ def -(x: Long): Long = sys.error("stub")
+ def -(x: Float): Float = sys.error("stub")
+ def -(x: Double): Double = sys.error("stub")
+
+ def *(x: Byte): Int = sys.error("stub")
+ def *(x: Short): Int = sys.error("stub")
+ def *(x: Char): Int = sys.error("stub")
+ def *(x: Int): Int = sys.error("stub")
+ def *(x: Long): Long = sys.error("stub")
+ def *(x: Float): Float = sys.error("stub")
+ def *(x: Double): Double = sys.error("stub")
+
+ def /(x: Byte): Int = sys.error("stub")
+ def /(x: Short): Int = sys.error("stub")
+ def /(x: Char): Int = sys.error("stub")
+ def /(x: Int): Int = sys.error("stub")
+ def /(x: Long): Long = sys.error("stub")
+ def /(x: Float): Float = sys.error("stub")
+ def /(x: Double): Double = sys.error("stub")
+
+ def %(x: Byte): Int = sys.error("stub")
+ def %(x: Short): Int = sys.error("stub")
+ def %(x: Char): Int = sys.error("stub")
+ def %(x: Int): Int = sys.error("stub")
+ def %(x: Long): Long = sys.error("stub")
+ def %(x: Float): Float = sys.error("stub")
+ def %(x: Double): Double = sys.error("stub")
+
+}
+
+
+object Byte extends AnyValCompanion {
+ final val MinValue = jl.Byte.MIN_VALUE
+ final val MaxValue = jl.Byte.MAX_VALUE
+
+ def box(x: Byte): jl.Byte = jl.Byte.valueOf(x)
+ def unbox(x: jl.Object): Byte = x.asInstanceOf[jl.Byte].byteValue()
+ override def toString = "object scala.Byte"
+}
diff --git a/src/library/scala/Char.scala b/src/library/scala/Char.scala
new file mode 100644
index 0000000000..3c3f292fd2
--- /dev/null
+++ b/src/library/scala/Char.scala
@@ -0,0 +1,154 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+
+final class Char extends AnyVal {
+ def toByte: Byte = sys.error("stub")
+ def toShort: Short = sys.error("stub")
+ def toChar: Char = sys.error("stub")
+ def toInt: Int = sys.error("stub")
+ def toLong: Long = sys.error("stub")
+ def toFloat: Float = sys.error("stub")
+ def toDouble: Double = sys.error("stub")
+
+ def unary_+ : Int = sys.error("stub")
+ def unary_- : Int = sys.error("stub")
+ def unary_~ : Int = sys.error("stub")
+
+ def +(x: String): String = sys.error("stub")
+
+ def <<(x: Int): Int = sys.error("stub")
+ def <<(x: Long): Int = sys.error("stub")
+ def >>>(x: Int): Int = sys.error("stub")
+ def >>>(x: Long): Int = sys.error("stub")
+ def >>(x: Int): Int = sys.error("stub")
+ def >>(x: Long): Int = sys.error("stub")
+
+ def ==(x: Byte): Boolean = sys.error("stub")
+ def ==(x: Short): Boolean = sys.error("stub")
+ def ==(x: Char): Boolean = sys.error("stub")
+ def ==(x: Int): Boolean = sys.error("stub")
+ def ==(x: Long): Boolean = sys.error("stub")
+ def ==(x: Float): Boolean = sys.error("stub")
+ def ==(x: Double): Boolean = sys.error("stub")
+
+ def !=(x: Byte): Boolean = sys.error("stub")
+ def !=(x: Short): Boolean = sys.error("stub")
+ def !=(x: Char): Boolean = sys.error("stub")
+ def !=(x: Int): Boolean = sys.error("stub")
+ def !=(x: Long): Boolean = sys.error("stub")
+ def !=(x: Float): Boolean = sys.error("stub")
+ def !=(x: Double): Boolean = sys.error("stub")
+
+ def <(x: Byte): Boolean = sys.error("stub")
+ def <(x: Short): Boolean = sys.error("stub")
+ def <(x: Char): Boolean = sys.error("stub")
+ def <(x: Int): Boolean = sys.error("stub")
+ def <(x: Long): Boolean = sys.error("stub")
+ def <(x: Float): Boolean = sys.error("stub")
+ def <(x: Double): Boolean = sys.error("stub")
+
+ def <=(x: Byte): Boolean = sys.error("stub")
+ def <=(x: Short): Boolean = sys.error("stub")
+ def <=(x: Char): Boolean = sys.error("stub")
+ def <=(x: Int): Boolean = sys.error("stub")
+ def <=(x: Long): Boolean = sys.error("stub")
+ def <=(x: Float): Boolean = sys.error("stub")
+ def <=(x: Double): Boolean = sys.error("stub")
+
+ def >(x: Byte): Boolean = sys.error("stub")
+ def >(x: Short): Boolean = sys.error("stub")
+ def >(x: Char): Boolean = sys.error("stub")
+ def >(x: Int): Boolean = sys.error("stub")
+ def >(x: Long): Boolean = sys.error("stub")
+ def >(x: Float): Boolean = sys.error("stub")
+ def >(x: Double): Boolean = sys.error("stub")
+
+ def >=(x: Byte): Boolean = sys.error("stub")
+ def >=(x: Short): Boolean = sys.error("stub")
+ def >=(x: Char): Boolean = sys.error("stub")
+ def >=(x: Int): Boolean = sys.error("stub")
+ def >=(x: Long): Boolean = sys.error("stub")
+ def >=(x: Float): Boolean = sys.error("stub")
+ def >=(x: Double): Boolean = sys.error("stub")
+
+ def |(x: Byte): Int = sys.error("stub")
+ def |(x: Short): Int = sys.error("stub")
+ def |(x: Char): Int = sys.error("stub")
+ def |(x: Int): Int = sys.error("stub")
+ def |(x: Long): Long = sys.error("stub")
+
+ def &(x: Byte): Int = sys.error("stub")
+ def &(x: Short): Int = sys.error("stub")
+ def &(x: Char): Int = sys.error("stub")
+ def &(x: Int): Int = sys.error("stub")
+ def &(x: Long): Long = sys.error("stub")
+
+ def ^(x: Byte): Int = sys.error("stub")
+ def ^(x: Short): Int = sys.error("stub")
+ def ^(x: Char): Int = sys.error("stub")
+ def ^(x: Int): Int = sys.error("stub")
+ def ^(x: Long): Long = sys.error("stub")
+
+ def +(x: Byte): Int = sys.error("stub")
+ def +(x: Short): Int = sys.error("stub")
+ def +(x: Char): Int = sys.error("stub")
+ def +(x: Int): Int = sys.error("stub")
+ def +(x: Long): Long = sys.error("stub")
+ def +(x: Float): Float = sys.error("stub")
+ def +(x: Double): Double = sys.error("stub")
+
+ def -(x: Byte): Int = sys.error("stub")
+ def -(x: Short): Int = sys.error("stub")
+ def -(x: Char): Int = sys.error("stub")
+ def -(x: Int): Int = sys.error("stub")
+ def -(x: Long): Long = sys.error("stub")
+ def -(x: Float): Float = sys.error("stub")
+ def -(x: Double): Double = sys.error("stub")
+
+ def *(x: Byte): Int = sys.error("stub")
+ def *(x: Short): Int = sys.error("stub")
+ def *(x: Char): Int = sys.error("stub")
+ def *(x: Int): Int = sys.error("stub")
+ def *(x: Long): Long = sys.error("stub")
+ def *(x: Float): Float = sys.error("stub")
+ def *(x: Double): Double = sys.error("stub")
+
+ def /(x: Byte): Int = sys.error("stub")
+ def /(x: Short): Int = sys.error("stub")
+ def /(x: Char): Int = sys.error("stub")
+ def /(x: Int): Int = sys.error("stub")
+ def /(x: Long): Long = sys.error("stub")
+ def /(x: Float): Float = sys.error("stub")
+ def /(x: Double): Double = sys.error("stub")
+
+ def %(x: Byte): Int = sys.error("stub")
+ def %(x: Short): Int = sys.error("stub")
+ def %(x: Char): Int = sys.error("stub")
+ def %(x: Int): Int = sys.error("stub")
+ def %(x: Long): Long = sys.error("stub")
+ def %(x: Float): Float = sys.error("stub")
+ def %(x: Double): Double = sys.error("stub")
+
+}
+
+
+object Char extends AnyValCompanion {
+ final val MinValue = jl.Character.MIN_VALUE
+ final val MaxValue = jl.Character.MAX_VALUE
+
+ def box(x: Char): jl.Character = jl.Character.valueOf(x)
+ def unbox(x: jl.Object): Char = x.asInstanceOf[jl.Character].charValue()
+ override def toString = "object scala.Char"
+}
diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala
new file mode 100644
index 0000000000..cc4f597bda
--- /dev/null
+++ b/src/library/scala/Double.scala
@@ -0,0 +1,137 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+
+final class Double extends AnyVal {
+ def toByte: Byte = sys.error("stub")
+ def toShort: Short = sys.error("stub")
+ def toChar: Char = sys.error("stub")
+ def toInt: Int = sys.error("stub")
+ def toLong: Long = sys.error("stub")
+ def toFloat: Float = sys.error("stub")
+ def toDouble: Double = sys.error("stub")
+
+ def unary_+ : Double = sys.error("stub")
+ def unary_- : Double = sys.error("stub")
+
+ def +(x: String): String = sys.error("stub")
+
+ def ==(x: Byte): Boolean = sys.error("stub")
+ def ==(x: Short): Boolean = sys.error("stub")
+ def ==(x: Char): Boolean = sys.error("stub")
+ def ==(x: Int): Boolean = sys.error("stub")
+ def ==(x: Long): Boolean = sys.error("stub")
+ def ==(x: Float): Boolean = sys.error("stub")
+ def ==(x: Double): Boolean = sys.error("stub")
+
+ def !=(x: Byte): Boolean = sys.error("stub")
+ def !=(x: Short): Boolean = sys.error("stub")
+ def !=(x: Char): Boolean = sys.error("stub")
+ def !=(x: Int): Boolean = sys.error("stub")
+ def !=(x: Long): Boolean = sys.error("stub")
+ def !=(x: Float): Boolean = sys.error("stub")
+ def !=(x: Double): Boolean = sys.error("stub")
+
+ def <(x: Byte): Boolean = sys.error("stub")
+ def <(x: Short): Boolean = sys.error("stub")
+ def <(x: Char): Boolean = sys.error("stub")
+ def <(x: Int): Boolean = sys.error("stub")
+ def <(x: Long): Boolean = sys.error("stub")
+ def <(x: Float): Boolean = sys.error("stub")
+ def <(x: Double): Boolean = sys.error("stub")
+
+ def <=(x: Byte): Boolean = sys.error("stub")
+ def <=(x: Short): Boolean = sys.error("stub")
+ def <=(x: Char): Boolean = sys.error("stub")
+ def <=(x: Int): Boolean = sys.error("stub")
+ def <=(x: Long): Boolean = sys.error("stub")
+ def <=(x: Float): Boolean = sys.error("stub")
+ def <=(x: Double): Boolean = sys.error("stub")
+
+ def >(x: Byte): Boolean = sys.error("stub")
+ def >(x: Short): Boolean = sys.error("stub")
+ def >(x: Char): Boolean = sys.error("stub")
+ def >(x: Int): Boolean = sys.error("stub")
+ def >(x: Long): Boolean = sys.error("stub")
+ def >(x: Float): Boolean = sys.error("stub")
+ def >(x: Double): Boolean = sys.error("stub")
+
+ def >=(x: Byte): Boolean = sys.error("stub")
+ def >=(x: Short): Boolean = sys.error("stub")
+ def >=(x: Char): Boolean = sys.error("stub")
+ def >=(x: Int): Boolean = sys.error("stub")
+ def >=(x: Long): Boolean = sys.error("stub")
+ def >=(x: Float): Boolean = sys.error("stub")
+ def >=(x: Double): Boolean = sys.error("stub")
+
+ def +(x: Byte): Double = sys.error("stub")
+ def +(x: Short): Double = sys.error("stub")
+ def +(x: Char): Double = sys.error("stub")
+ def +(x: Int): Double = sys.error("stub")
+ def +(x: Long): Double = sys.error("stub")
+ def +(x: Float): Double = sys.error("stub")
+ def +(x: Double): Double = sys.error("stub")
+
+ def -(x: Byte): Double = sys.error("stub")
+ def -(x: Short): Double = sys.error("stub")
+ def -(x: Char): Double = sys.error("stub")
+ def -(x: Int): Double = sys.error("stub")
+ def -(x: Long): Double = sys.error("stub")
+ def -(x: Float): Double = sys.error("stub")
+ def -(x: Double): Double = sys.error("stub")
+
+ def *(x: Byte): Double = sys.error("stub")
+ def *(x: Short): Double = sys.error("stub")
+ def *(x: Char): Double = sys.error("stub")
+ def *(x: Int): Double = sys.error("stub")
+ def *(x: Long): Double = sys.error("stub")
+ def *(x: Float): Double = sys.error("stub")
+ def *(x: Double): Double = sys.error("stub")
+
+ def /(x: Byte): Double = sys.error("stub")
+ def /(x: Short): Double = sys.error("stub")
+ def /(x: Char): Double = sys.error("stub")
+ def /(x: Int): Double = sys.error("stub")
+ def /(x: Long): Double = sys.error("stub")
+ def /(x: Float): Double = sys.error("stub")
+ def /(x: Double): Double = sys.error("stub")
+
+ def %(x: Byte): Double = sys.error("stub")
+ def %(x: Short): Double = sys.error("stub")
+ def %(x: Char): Double = sys.error("stub")
+ def %(x: Int): Double = sys.error("stub")
+ def %(x: Long): Double = sys.error("stub")
+ def %(x: Float): Double = sys.error("stub")
+ def %(x: Double): Double = sys.error("stub")
+
+}
+
+
+object Double extends AnyValCompanion {
+ final val MinPositiveValue = jl.Double.MIN_VALUE
+ final val MinNegativeValue = -jl.Double.MAX_VALUE
+ final val NaN = jl.Double.NaN
+ final val PositiveInfinity = jl.Double.POSITIVE_INFINITY
+ final val NegativeInfinity = jl.Double.NEGATIVE_INFINITY
+
+ @deprecated("use Double.MinPositiveValue instead")
+ final val Epsilon = MinPositiveValue
+ @deprecated("use Double.MinNegativeValue instead")
+ final val MinValue = MinNegativeValue
+ final val MaxValue = jl.Double.MAX_VALUE
+
+ def box(x: Double): jl.Double = jl.Double.valueOf(x)
+ def unbox(x: jl.Object): Double = x.asInstanceOf[jl.Double].doubleValue()
+ override def toString = "object scala.Double"
+}
diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala
new file mode 100644
index 0000000000..81b464078d
--- /dev/null
+++ b/src/library/scala/Float.scala
@@ -0,0 +1,137 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+
+final class Float extends AnyVal {
+ def toByte: Byte = sys.error("stub")
+ def toShort: Short = sys.error("stub")
+ def toChar: Char = sys.error("stub")
+ def toInt: Int = sys.error("stub")
+ def toLong: Long = sys.error("stub")
+ def toFloat: Float = sys.error("stub")
+ def toDouble: Double = sys.error("stub")
+
+ def unary_+ : Float = sys.error("stub")
+ def unary_- : Float = sys.error("stub")
+
+ def +(x: String): String = sys.error("stub")
+
+ def ==(x: Byte): Boolean = sys.error("stub")
+ def ==(x: Short): Boolean = sys.error("stub")
+ def ==(x: Char): Boolean = sys.error("stub")
+ def ==(x: Int): Boolean = sys.error("stub")
+ def ==(x: Long): Boolean = sys.error("stub")
+ def ==(x: Float): Boolean = sys.error("stub")
+ def ==(x: Double): Boolean = sys.error("stub")
+
+ def !=(x: Byte): Boolean = sys.error("stub")
+ def !=(x: Short): Boolean = sys.error("stub")
+ def !=(x: Char): Boolean = sys.error("stub")
+ def !=(x: Int): Boolean = sys.error("stub")
+ def !=(x: Long): Boolean = sys.error("stub")
+ def !=(x: Float): Boolean = sys.error("stub")
+ def !=(x: Double): Boolean = sys.error("stub")
+
+ def <(x: Byte): Boolean = sys.error("stub")
+ def <(x: Short): Boolean = sys.error("stub")
+ def <(x: Char): Boolean = sys.error("stub")
+ def <(x: Int): Boolean = sys.error("stub")
+ def <(x: Long): Boolean = sys.error("stub")
+ def <(x: Float): Boolean = sys.error("stub")
+ def <(x: Double): Boolean = sys.error("stub")
+
+ def <=(x: Byte): Boolean = sys.error("stub")
+ def <=(x: Short): Boolean = sys.error("stub")
+ def <=(x: Char): Boolean = sys.error("stub")
+ def <=(x: Int): Boolean = sys.error("stub")
+ def <=(x: Long): Boolean = sys.error("stub")
+ def <=(x: Float): Boolean = sys.error("stub")
+ def <=(x: Double): Boolean = sys.error("stub")
+
+ def >(x: Byte): Boolean = sys.error("stub")
+ def >(x: Short): Boolean = sys.error("stub")
+ def >(x: Char): Boolean = sys.error("stub")
+ def >(x: Int): Boolean = sys.error("stub")
+ def >(x: Long): Boolean = sys.error("stub")
+ def >(x: Float): Boolean = sys.error("stub")
+ def >(x: Double): Boolean = sys.error("stub")
+
+ def >=(x: Byte): Boolean = sys.error("stub")
+ def >=(x: Short): Boolean = sys.error("stub")
+ def >=(x: Char): Boolean = sys.error("stub")
+ def >=(x: Int): Boolean = sys.error("stub")
+ def >=(x: Long): Boolean = sys.error("stub")
+ def >=(x: Float): Boolean = sys.error("stub")
+ def >=(x: Double): Boolean = sys.error("stub")
+
+ def +(x: Byte): Float = sys.error("stub")
+ def +(x: Short): Float = sys.error("stub")
+ def +(x: Char): Float = sys.error("stub")
+ def +(x: Int): Float = sys.error("stub")
+ def +(x: Long): Float = sys.error("stub")
+ def +(x: Float): Float = sys.error("stub")
+ def +(x: Double): Double = sys.error("stub")
+
+ def -(x: Byte): Float = sys.error("stub")
+ def -(x: Short): Float = sys.error("stub")
+ def -(x: Char): Float = sys.error("stub")
+ def -(x: Int): Float = sys.error("stub")
+ def -(x: Long): Float = sys.error("stub")
+ def -(x: Float): Float = sys.error("stub")
+ def -(x: Double): Double = sys.error("stub")
+
+ def *(x: Byte): Float = sys.error("stub")
+ def *(x: Short): Float = sys.error("stub")
+ def *(x: Char): Float = sys.error("stub")
+ def *(x: Int): Float = sys.error("stub")
+ def *(x: Long): Float = sys.error("stub")
+ def *(x: Float): Float = sys.error("stub")
+ def *(x: Double): Double = sys.error("stub")
+
+ def /(x: Byte): Float = sys.error("stub")
+ def /(x: Short): Float = sys.error("stub")
+ def /(x: Char): Float = sys.error("stub")
+ def /(x: Int): Float = sys.error("stub")
+ def /(x: Long): Float = sys.error("stub")
+ def /(x: Float): Float = sys.error("stub")
+ def /(x: Double): Double = sys.error("stub")
+
+ def %(x: Byte): Float = sys.error("stub")
+ def %(x: Short): Float = sys.error("stub")
+ def %(x: Char): Float = sys.error("stub")
+ def %(x: Int): Float = sys.error("stub")
+ def %(x: Long): Float = sys.error("stub")
+ def %(x: Float): Float = sys.error("stub")
+ def %(x: Double): Double = sys.error("stub")
+
+}
+
+
+object Float extends AnyValCompanion {
+ final val MinPositiveValue = jl.Float.MIN_VALUE
+ final val MinNegativeValue = -jl.Float.MAX_VALUE
+ final val NaN = jl.Float.NaN
+ final val PositiveInfinity = jl.Float.POSITIVE_INFINITY
+ final val NegativeInfinity = jl.Float.NEGATIVE_INFINITY
+
+ @deprecated("use Float.MinPositiveValue instead")
+ final val Epsilon = MinPositiveValue
+ @deprecated("use Float.MinNegativeValue instead")
+ final val MinValue = MinNegativeValue
+ final val MaxValue = jl.Float.MAX_VALUE
+
+ def box(x: Float): jl.Float = jl.Float.valueOf(x)
+ def unbox(x: jl.Object): Float = x.asInstanceOf[jl.Float].floatValue()
+ override def toString = "object scala.Float"
+}
diff --git a/src/library/scala/Int.scala b/src/library/scala/Int.scala
new file mode 100644
index 0000000000..416512d43b
--- /dev/null
+++ b/src/library/scala/Int.scala
@@ -0,0 +1,154 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+
+final class Int extends AnyVal {
+ def toByte: Byte = sys.error("stub")
+ def toShort: Short = sys.error("stub")
+ def toChar: Char = sys.error("stub")
+ def toInt: Int = sys.error("stub")
+ def toLong: Long = sys.error("stub")
+ def toFloat: Float = sys.error("stub")
+ def toDouble: Double = sys.error("stub")
+
+ def unary_+ : Int = sys.error("stub")
+ def unary_- : Int = sys.error("stub")
+ def unary_~ : Int = sys.error("stub")
+
+ def +(x: String): String = sys.error("stub")
+
+ def <<(x: Int): Int = sys.error("stub")
+ def <<(x: Long): Int = sys.error("stub")
+ def >>>(x: Int): Int = sys.error("stub")
+ def >>>(x: Long): Int = sys.error("stub")
+ def >>(x: Int): Int = sys.error("stub")
+ def >>(x: Long): Int = sys.error("stub")
+
+ def ==(x: Byte): Boolean = sys.error("stub")
+ def ==(x: Short): Boolean = sys.error("stub")
+ def ==(x: Char): Boolean = sys.error("stub")
+ def ==(x: Int): Boolean = sys.error("stub")
+ def ==(x: Long): Boolean = sys.error("stub")
+ def ==(x: Float): Boolean = sys.error("stub")
+ def ==(x: Double): Boolean = sys.error("stub")
+
+ def !=(x: Byte): Boolean = sys.error("stub")
+ def !=(x: Short): Boolean = sys.error("stub")
+ def !=(x: Char): Boolean = sys.error("stub")
+ def !=(x: Int): Boolean = sys.error("stub")
+ def !=(x: Long): Boolean = sys.error("stub")
+ def !=(x: Float): Boolean = sys.error("stub")
+ def !=(x: Double): Boolean = sys.error("stub")
+
+ def <(x: Byte): Boolean = sys.error("stub")
+ def <(x: Short): Boolean = sys.error("stub")
+ def <(x: Char): Boolean = sys.error("stub")
+ def <(x: Int): Boolean = sys.error("stub")
+ def <(x: Long): Boolean = sys.error("stub")
+ def <(x: Float): Boolean = sys.error("stub")
+ def <(x: Double): Boolean = sys.error("stub")
+
+ def <=(x: Byte): Boolean = sys.error("stub")
+ def <=(x: Short): Boolean = sys.error("stub")
+ def <=(x: Char): Boolean = sys.error("stub")
+ def <=(x: Int): Boolean = sys.error("stub")
+ def <=(x: Long): Boolean = sys.error("stub")
+ def <=(x: Float): Boolean = sys.error("stub")
+ def <=(x: Double): Boolean = sys.error("stub")
+
+ def >(x: Byte): Boolean = sys.error("stub")
+ def >(x: Short): Boolean = sys.error("stub")
+ def >(x: Char): Boolean = sys.error("stub")
+ def >(x: Int): Boolean = sys.error("stub")
+ def >(x: Long): Boolean = sys.error("stub")
+ def >(x: Float): Boolean = sys.error("stub")
+ def >(x: Double): Boolean = sys.error("stub")
+
+ def >=(x: Byte): Boolean = sys.error("stub")
+ def >=(x: Short): Boolean = sys.error("stub")
+ def >=(x: Char): Boolean = sys.error("stub")
+ def >=(x: Int): Boolean = sys.error("stub")
+ def >=(x: Long): Boolean = sys.error("stub")
+ def >=(x: Float): Boolean = sys.error("stub")
+ def >=(x: Double): Boolean = sys.error("stub")
+
+ def |(x: Byte): Int = sys.error("stub")
+ def |(x: Short): Int = sys.error("stub")
+ def |(x: Char): Int = sys.error("stub")
+ def |(x: Int): Int = sys.error("stub")
+ def |(x: Long): Long = sys.error("stub")
+
+ def &(x: Byte): Int = sys.error("stub")
+ def &(x: Short): Int = sys.error("stub")
+ def &(x: Char): Int = sys.error("stub")
+ def &(x: Int): Int = sys.error("stub")
+ def &(x: Long): Long = sys.error("stub")
+
+ def ^(x: Byte): Int = sys.error("stub")
+ def ^(x: Short): Int = sys.error("stub")
+ def ^(x: Char): Int = sys.error("stub")
+ def ^(x: Int): Int = sys.error("stub")
+ def ^(x: Long): Long = sys.error("stub")
+
+ def +(x: Byte): Int = sys.error("stub")
+ def +(x: Short): Int = sys.error("stub")
+ def +(x: Char): Int = sys.error("stub")
+ def +(x: Int): Int = sys.error("stub")
+ def +(x: Long): Long = sys.error("stub")
+ def +(x: Float): Float = sys.error("stub")
+ def +(x: Double): Double = sys.error("stub")
+
+ def -(x: Byte): Int = sys.error("stub")
+ def -(x: Short): Int = sys.error("stub")
+ def -(x: Char): Int = sys.error("stub")
+ def -(x: Int): Int = sys.error("stub")
+ def -(x: Long): Long = sys.error("stub")
+ def -(x: Float): Float = sys.error("stub")
+ def -(x: Double): Double = sys.error("stub")
+
+ def *(x: Byte): Int = sys.error("stub")
+ def *(x: Short): Int = sys.error("stub")
+ def *(x: Char): Int = sys.error("stub")
+ def *(x: Int): Int = sys.error("stub")
+ def *(x: Long): Long = sys.error("stub")
+ def *(x: Float): Float = sys.error("stub")
+ def *(x: Double): Double = sys.error("stub")
+
+ def /(x: Byte): Int = sys.error("stub")
+ def /(x: Short): Int = sys.error("stub")
+ def /(x: Char): Int = sys.error("stub")
+ def /(x: Int): Int = sys.error("stub")
+ def /(x: Long): Long = sys.error("stub")
+ def /(x: Float): Float = sys.error("stub")
+ def /(x: Double): Double = sys.error("stub")
+
+ def %(x: Byte): Int = sys.error("stub")
+ def %(x: Short): Int = sys.error("stub")
+ def %(x: Char): Int = sys.error("stub")
+ def %(x: Int): Int = sys.error("stub")
+ def %(x: Long): Long = sys.error("stub")
+ def %(x: Float): Float = sys.error("stub")
+ def %(x: Double): Double = sys.error("stub")
+
+}
+
+
+object Int extends AnyValCompanion {
+ final val MinValue = jl.Integer.MIN_VALUE
+ final val MaxValue = jl.Integer.MAX_VALUE
+
+ def box(x: Int): jl.Integer = jl.Integer.valueOf(x)
+ def unbox(x: jl.Object): Int = x.asInstanceOf[jl.Integer].intValue()
+ override def toString = "object scala.Int"
+}
diff --git a/src/library/scala/Long.scala b/src/library/scala/Long.scala
new file mode 100644
index 0000000000..25b6873e72
--- /dev/null
+++ b/src/library/scala/Long.scala
@@ -0,0 +1,154 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+
+final class Long extends AnyVal {
+ def toByte: Byte = sys.error("stub")
+ def toShort: Short = sys.error("stub")
+ def toChar: Char = sys.error("stub")
+ def toInt: Int = sys.error("stub")
+ def toLong: Long = sys.error("stub")
+ def toFloat: Float = sys.error("stub")
+ def toDouble: Double = sys.error("stub")
+
+ def unary_+ : Long = sys.error("stub")
+ def unary_- : Long = sys.error("stub")
+ def unary_~ : Long = sys.error("stub")
+
+ def +(x: String): String = sys.error("stub")
+
+ def <<(x: Int): Long = sys.error("stub")
+ def <<(x: Long): Long = sys.error("stub")
+ def >>>(x: Int): Long = sys.error("stub")
+ def >>>(x: Long): Long = sys.error("stub")
+ def >>(x: Int): Long = sys.error("stub")
+ def >>(x: Long): Long = sys.error("stub")
+
+ def ==(x: Byte): Boolean = sys.error("stub")
+ def ==(x: Short): Boolean = sys.error("stub")
+ def ==(x: Char): Boolean = sys.error("stub")
+ def ==(x: Int): Boolean = sys.error("stub")
+ def ==(x: Long): Boolean = sys.error("stub")
+ def ==(x: Float): Boolean = sys.error("stub")
+ def ==(x: Double): Boolean = sys.error("stub")
+
+ def !=(x: Byte): Boolean = sys.error("stub")
+ def !=(x: Short): Boolean = sys.error("stub")
+ def !=(x: Char): Boolean = sys.error("stub")
+ def !=(x: Int): Boolean = sys.error("stub")
+ def !=(x: Long): Boolean = sys.error("stub")
+ def !=(x: Float): Boolean = sys.error("stub")
+ def !=(x: Double): Boolean = sys.error("stub")
+
+ def <(x: Byte): Boolean = sys.error("stub")
+ def <(x: Short): Boolean = sys.error("stub")
+ def <(x: Char): Boolean = sys.error("stub")
+ def <(x: Int): Boolean = sys.error("stub")
+ def <(x: Long): Boolean = sys.error("stub")
+ def <(x: Float): Boolean = sys.error("stub")
+ def <(x: Double): Boolean = sys.error("stub")
+
+ def <=(x: Byte): Boolean = sys.error("stub")
+ def <=(x: Short): Boolean = sys.error("stub")
+ def <=(x: Char): Boolean = sys.error("stub")
+ def <=(x: Int): Boolean = sys.error("stub")
+ def <=(x: Long): Boolean = sys.error("stub")
+ def <=(x: Float): Boolean = sys.error("stub")
+ def <=(x: Double): Boolean = sys.error("stub")
+
+ def >(x: Byte): Boolean = sys.error("stub")
+ def >(x: Short): Boolean = sys.error("stub")
+ def >(x: Char): Boolean = sys.error("stub")
+ def >(x: Int): Boolean = sys.error("stub")
+ def >(x: Long): Boolean = sys.error("stub")
+ def >(x: Float): Boolean = sys.error("stub")
+ def >(x: Double): Boolean = sys.error("stub")
+
+ def >=(x: Byte): Boolean = sys.error("stub")
+ def >=(x: Short): Boolean = sys.error("stub")
+ def >=(x: Char): Boolean = sys.error("stub")
+ def >=(x: Int): Boolean = sys.error("stub")
+ def >=(x: Long): Boolean = sys.error("stub")
+ def >=(x: Float): Boolean = sys.error("stub")
+ def >=(x: Double): Boolean = sys.error("stub")
+
+ def |(x: Byte): Long = sys.error("stub")
+ def |(x: Short): Long = sys.error("stub")
+ def |(x: Char): Long = sys.error("stub")
+ def |(x: Int): Long = sys.error("stub")
+ def |(x: Long): Long = sys.error("stub")
+
+ def &(x: Byte): Long = sys.error("stub")
+ def &(x: Short): Long = sys.error("stub")
+ def &(x: Char): Long = sys.error("stub")
+ def &(x: Int): Long = sys.error("stub")
+ def &(x: Long): Long = sys.error("stub")
+
+ def ^(x: Byte): Long = sys.error("stub")
+ def ^(x: Short): Long = sys.error("stub")
+ def ^(x: Char): Long = sys.error("stub")
+ def ^(x: Int): Long = sys.error("stub")
+ def ^(x: Long): Long = sys.error("stub")
+
+ def +(x: Byte): Long = sys.error("stub")
+ def +(x: Short): Long = sys.error("stub")
+ def +(x: Char): Long = sys.error("stub")
+ def +(x: Int): Long = sys.error("stub")
+ def +(x: Long): Long = sys.error("stub")
+ def +(x: Float): Float = sys.error("stub")
+ def +(x: Double): Double = sys.error("stub")
+
+ def -(x: Byte): Long = sys.error("stub")
+ def -(x: Short): Long = sys.error("stub")
+ def -(x: Char): Long = sys.error("stub")
+ def -(x: Int): Long = sys.error("stub")
+ def -(x: Long): Long = sys.error("stub")
+ def -(x: Float): Float = sys.error("stub")
+ def -(x: Double): Double = sys.error("stub")
+
+ def *(x: Byte): Long = sys.error("stub")
+ def *(x: Short): Long = sys.error("stub")
+ def *(x: Char): Long = sys.error("stub")
+ def *(x: Int): Long = sys.error("stub")
+ def *(x: Long): Long = sys.error("stub")
+ def *(x: Float): Float = sys.error("stub")
+ def *(x: Double): Double = sys.error("stub")
+
+ def /(x: Byte): Long = sys.error("stub")
+ def /(x: Short): Long = sys.error("stub")
+ def /(x: Char): Long = sys.error("stub")
+ def /(x: Int): Long = sys.error("stub")
+ def /(x: Long): Long = sys.error("stub")
+ def /(x: Float): Float = sys.error("stub")
+ def /(x: Double): Double = sys.error("stub")
+
+ def %(x: Byte): Long = sys.error("stub")
+ def %(x: Short): Long = sys.error("stub")
+ def %(x: Char): Long = sys.error("stub")
+ def %(x: Int): Long = sys.error("stub")
+ def %(x: Long): Long = sys.error("stub")
+ def %(x: Float): Float = sys.error("stub")
+ def %(x: Double): Double = sys.error("stub")
+
+}
+
+
+object Long extends AnyValCompanion {
+ final val MinValue = jl.Long.MIN_VALUE
+ final val MaxValue = jl.Long.MAX_VALUE
+
+ def box(x: Long): jl.Long = jl.Long.valueOf(x)
+ def unbox(x: jl.Object): Long = x.asInstanceOf[jl.Long].longValue()
+ override def toString = "object scala.Long"
+}
diff --git a/src/library/scala/Short.scala b/src/library/scala/Short.scala
new file mode 100644
index 0000000000..abbb939c4c
--- /dev/null
+++ b/src/library/scala/Short.scala
@@ -0,0 +1,154 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+
+final class Short extends AnyVal {
+ def toByte: Byte = sys.error("stub")
+ def toShort: Short = sys.error("stub")
+ def toChar: Char = sys.error("stub")
+ def toInt: Int = sys.error("stub")
+ def toLong: Long = sys.error("stub")
+ def toFloat: Float = sys.error("stub")
+ def toDouble: Double = sys.error("stub")
+
+ def unary_+ : Int = sys.error("stub")
+ def unary_- : Int = sys.error("stub")
+ def unary_~ : Int = sys.error("stub")
+
+ def +(x: String): String = sys.error("stub")
+
+ def <<(x: Int): Int = sys.error("stub")
+ def <<(x: Long): Int = sys.error("stub")
+ def >>>(x: Int): Int = sys.error("stub")
+ def >>>(x: Long): Int = sys.error("stub")
+ def >>(x: Int): Int = sys.error("stub")
+ def >>(x: Long): Int = sys.error("stub")
+
+ def ==(x: Byte): Boolean = sys.error("stub")
+ def ==(x: Short): Boolean = sys.error("stub")
+ def ==(x: Char): Boolean = sys.error("stub")
+ def ==(x: Int): Boolean = sys.error("stub")
+ def ==(x: Long): Boolean = sys.error("stub")
+ def ==(x: Float): Boolean = sys.error("stub")
+ def ==(x: Double): Boolean = sys.error("stub")
+
+ def !=(x: Byte): Boolean = sys.error("stub")
+ def !=(x: Short): Boolean = sys.error("stub")
+ def !=(x: Char): Boolean = sys.error("stub")
+ def !=(x: Int): Boolean = sys.error("stub")
+ def !=(x: Long): Boolean = sys.error("stub")
+ def !=(x: Float): Boolean = sys.error("stub")
+ def !=(x: Double): Boolean = sys.error("stub")
+
+ def <(x: Byte): Boolean = sys.error("stub")
+ def <(x: Short): Boolean = sys.error("stub")
+ def <(x: Char): Boolean = sys.error("stub")
+ def <(x: Int): Boolean = sys.error("stub")
+ def <(x: Long): Boolean = sys.error("stub")
+ def <(x: Float): Boolean = sys.error("stub")
+ def <(x: Double): Boolean = sys.error("stub")
+
+ def <=(x: Byte): Boolean = sys.error("stub")
+ def <=(x: Short): Boolean = sys.error("stub")
+ def <=(x: Char): Boolean = sys.error("stub")
+ def <=(x: Int): Boolean = sys.error("stub")
+ def <=(x: Long): Boolean = sys.error("stub")
+ def <=(x: Float): Boolean = sys.error("stub")
+ def <=(x: Double): Boolean = sys.error("stub")
+
+ def >(x: Byte): Boolean = sys.error("stub")
+ def >(x: Short): Boolean = sys.error("stub")
+ def >(x: Char): Boolean = sys.error("stub")
+ def >(x: Int): Boolean = sys.error("stub")
+ def >(x: Long): Boolean = sys.error("stub")
+ def >(x: Float): Boolean = sys.error("stub")
+ def >(x: Double): Boolean = sys.error("stub")
+
+ def >=(x: Byte): Boolean = sys.error("stub")
+ def >=(x: Short): Boolean = sys.error("stub")
+ def >=(x: Char): Boolean = sys.error("stub")
+ def >=(x: Int): Boolean = sys.error("stub")
+ def >=(x: Long): Boolean = sys.error("stub")
+ def >=(x: Float): Boolean = sys.error("stub")
+ def >=(x: Double): Boolean = sys.error("stub")
+
+ def |(x: Byte): Int = sys.error("stub")
+ def |(x: Short): Int = sys.error("stub")
+ def |(x: Char): Int = sys.error("stub")
+ def |(x: Int): Int = sys.error("stub")
+ def |(x: Long): Long = sys.error("stub")
+
+ def &(x: Byte): Int = sys.error("stub")
+ def &(x: Short): Int = sys.error("stub")
+ def &(x: Char): Int = sys.error("stub")
+ def &(x: Int): Int = sys.error("stub")
+ def &(x: Long): Long = sys.error("stub")
+
+ def ^(x: Byte): Int = sys.error("stub")
+ def ^(x: Short): Int = sys.error("stub")
+ def ^(x: Char): Int = sys.error("stub")
+ def ^(x: Int): Int = sys.error("stub")
+ def ^(x: Long): Long = sys.error("stub")
+
+ def +(x: Byte): Int = sys.error("stub")
+ def +(x: Short): Int = sys.error("stub")
+ def +(x: Char): Int = sys.error("stub")
+ def +(x: Int): Int = sys.error("stub")
+ def +(x: Long): Long = sys.error("stub")
+ def +(x: Float): Float = sys.error("stub")
+ def +(x: Double): Double = sys.error("stub")
+
+ def -(x: Byte): Int = sys.error("stub")
+ def -(x: Short): Int = sys.error("stub")
+ def -(x: Char): Int = sys.error("stub")
+ def -(x: Int): Int = sys.error("stub")
+ def -(x: Long): Long = sys.error("stub")
+ def -(x: Float): Float = sys.error("stub")
+ def -(x: Double): Double = sys.error("stub")
+
+ def *(x: Byte): Int = sys.error("stub")
+ def *(x: Short): Int = sys.error("stub")
+ def *(x: Char): Int = sys.error("stub")
+ def *(x: Int): Int = sys.error("stub")
+ def *(x: Long): Long = sys.error("stub")
+ def *(x: Float): Float = sys.error("stub")
+ def *(x: Double): Double = sys.error("stub")
+
+ def /(x: Byte): Int = sys.error("stub")
+ def /(x: Short): Int = sys.error("stub")
+ def /(x: Char): Int = sys.error("stub")
+ def /(x: Int): Int = sys.error("stub")
+ def /(x: Long): Long = sys.error("stub")
+ def /(x: Float): Float = sys.error("stub")
+ def /(x: Double): Double = sys.error("stub")
+
+ def %(x: Byte): Int = sys.error("stub")
+ def %(x: Short): Int = sys.error("stub")
+ def %(x: Char): Int = sys.error("stub")
+ def %(x: Int): Int = sys.error("stub")
+ def %(x: Long): Long = sys.error("stub")
+ def %(x: Float): Float = sys.error("stub")
+ def %(x: Double): Double = sys.error("stub")
+
+}
+
+
+object Short extends AnyValCompanion {
+ final val MinValue = jl.Short.MIN_VALUE
+ final val MaxValue = jl.Short.MAX_VALUE
+
+ def box(x: Short): jl.Short = jl.Short.valueOf(x)
+ def unbox(x: jl.Object): Short = x.asInstanceOf[jl.Short].shortValue()
+ override def toString = "object scala.Short"
+}
diff --git a/src/library/scala/Unit.scala b/src/library/scala/Unit.scala
new file mode 100755
index 0000000000..7ef282a9ad
--- /dev/null
+++ b/src/library/scala/Unit.scala
@@ -0,0 +1,23 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// generated on Sun Jan 23 21:13:38 PST 2011
+
+package scala
+
+import java.{ lang => jl }
+
+import runtime.BoxedUnit
+
+final class Unit extends AnyVal { }
+
+object Unit extends AnyValCompanion {
+ override def toString = "object scala.Unit"
+ def box(x: Unit): BoxedUnit = BoxedUnit.UNIT
+ def unbox(x: jl.Object): Unit = ()
+} \ No newline at end of file
diff --git a/src/library/scala/runtime/AnyValCompanion.scala b/src/library/scala/runtime/AnyValCompanion.scala
index 34d6069cc8..5f6f581f50 100644
--- a/src/library/scala/runtime/AnyValCompanion.scala
+++ b/src/library/scala/runtime/AnyValCompanion.scala
@@ -6,81 +6,9 @@
** |/ **
\* */
-
-
package scala.runtime
-/** A common supertype for companion classes of primitive types.
- *
- * A common trait for /companion/ objects of primitive types comes handy
- * when parameterizing code on types. For instance, the specialized
- * annotation is passed a sequence of types on which to specialize:
- * {{{
- * class Tuple1[@specialized(Unit, Int, Double) T]
- * }}}
- *
- */
-sealed trait AnyValCompanion
-
-/** A object representing `object scala.Unit`. It should never be used
- * directly.
- */
-object Unit extends AnyValCompanion {
- override def toString = "object scala.Unit"
-}
-
-/** A object representing `object scala.Boolean`. It should never be used
- * directly.
- */
-object Boolean extends AnyValCompanion {
- override def toString = "object scala.Boolean"
-}
-
-/** A object representing `object scala.Byte`. It should never be used
- * directly.
- */
-object Byte extends AnyValCompanion {
- override def toString = "object scala.Byte"
-}
-
-/** A object representing `object scala.Short`. It should never be used
- * directly.
- */
-object Short extends AnyValCompanion {
- override def toString = "object scala.Short"
-}
-
-/** A object representing `object scala.Char`. It should never be used
- * directly.
- */
-object Char extends AnyValCompanion {
- override def toString = "object scala.Char"
-}
-
-/** A object representing `object scala.Int`. It should never be used
- * directly.
- */
-object Int extends AnyValCompanion {
- override def toString = "object scala.Int"
-}
-
-/** A object representing `object scala.Long`. It should never be used
- * directly.
- */
-object Long extends AnyValCompanion {
- override def toString = "object scala.Long"
-}
-
-/** A object representing `object scala.Float`. It should never be used
- * directly.
- */
-object Float extends AnyValCompanion {
- override def toString = "object scala.Float"
-}
-
-/** A object representing `object scala.Double`. It should never be used
- * directly.
+/** See scala.AnyValCompanion.
*/
-object Double extends AnyValCompanion {
- override def toString = "object scala.Double"
-}
+@deprecated("Use scala.AnyValCompanion instead")
+private[scala] trait AnyValCompanion extends scala.AnyValCompanion { } \ No newline at end of file
diff --git a/src/library/scala/runtime/package.scala b/src/library/scala/runtime/package.scala
new file mode 100644
index 0000000000..83947cce9f
--- /dev/null
+++ b/src/library/scala/runtime/package.scala
@@ -0,0 +1,13 @@
+package scala
+
+package object runtime {
+ @deprecated("Use `scala.Unit` instead.") val Unit = scala.Unit
+ @deprecated("Use `scala.Boolean` instead.") val Boolean = scala.Boolean
+ @deprecated("Use `scala.Byte` instead.") val Byte = scala.Byte
+ @deprecated("Use `scala.Short` instead.") val Short = scala.Short
+ @deprecated("Use `scala.Char` instead.") val Char = scala.Char
+ @deprecated("Use `scala.Int` instead.") val Int = scala.Int
+ @deprecated("Use `scala.Long` instead.") val Long = scala.Long
+ @deprecated("Use `scala.Float` instead.") val Float = scala.Float
+ @deprecated("Use `scala.Double` instead.") val Double = scala.Double
+}
diff --git a/src/library/scala/specialized.scala b/src/library/scala/specialized.scala
index 6f2e44f10f..656508c9d9 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: runtime.AnyValCompanion*) extends annotation.StaticAnnotation {
+class specialized(types: AnyValCompanion*) extends annotation.StaticAnnotation {
def this() {
this(Unit, Boolean, Byte, Short, Char, Int, Long, Float, Double)
}