summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2009-08-20 15:54:06 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2009-08-20 15:54:06 +0000
commitf56aac6b0feb696ca79c65e6ea89f779db4529a0 (patch)
tree9271c5e28a6a336df50c46784cd03fe0941d8c40
parentc54bca38b0cfe007e33c4db7dcc5cc7a32a83c1f (diff)
downloadscala-f56aac6b0feb696ca79c65e6ea89f779db4529a0.tar.gz
scala-f56aac6b0feb696ca79c65e6ea89f779db4529a0.tar.bz2
scala-f56aac6b0feb696ca79c65e6ea89f779db4529a0.zip
backed out changes to Predef, as they need a ne...
backed out changes to Predef, as they need a new STARR: one that does not have the assert at Implicits.scala:133
-rw-r--r--src/library/scala/Predef.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index 4932414457..1dcffd342c 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -76,9 +76,6 @@ object Predef {
val Map = collection.immutable.Map
val Set = collection.immutable.Set
- // no longer a view: subsumed by `conforms` (which is less likely to give rise to ambiguities)
- def identity[A](x: A): A = x
-
// errors and asserts -------------------------------------------------
def error(message: String): Nothing = throw new RuntimeException(message)
@@ -182,7 +179,7 @@ object Predef {
def readf3(format: String) = Console.readf3(format)
// views --------------------------------------------------------------
-
+ implicit def identity[A](x: A): A = x
implicit def byteWrapper(x: Byte) = new runtime.RichByte(x)
implicit def shortWrapper(x: Short) = new runtime.RichShort(x)
@@ -256,8 +253,8 @@ object Predef {
// reusing `Function2` and `identity` leads to ambiguities (any2stringadd is inferred)
// to constrain any abstract type T that's in scope in a method's argument list (not just the method's own type parameters)
// simply add an implicit argument of type `T <:< U`, where U is the required upper bound (for lower-bounds, use: `U <: T`)
- sealed abstract class <:<[-From, +To] extends (From => To)
- implicit def conforms[A]: A <:< A = new (A <:< A) {def apply(x: A) = x}
+ // sealed abstract class <:<[-From, +To] extends (From => To)
+ // implicit def conforms[A]: A <:< A = new (A <:< A) {def apply(x: A) = x}
def currentThread = java.lang.Thread.currentThread()
}