diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/Predef.scala | 9 |
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() } |