Created
June 22, 2012 03:27
-
-
Save paulp/2970006 to your computer and use it in GitHub Desktop.
repl implicits fun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> class A[T] { implicit def f(x: T): List[T] = Nil } | |
warning: there were 1 feature warnings; re-run with -feature for details | |
defined class A | |
scala> implicits[A[Int]].conversions > | |
implicit def f(x: Int): scala.List[Int] | |
scala> implicits[Predef.type].from[Int] > | |
implicit def int2IntegerConflict(x: Int): Object | |
implicit def int2Integer(x: Int): Integer | |
implicit def intWrapper(x: Int): scala.runtime.RichInt | |
scala> implicits[Predef.type].to[Int] > | |
implicit def Integer2int(x: Integer): Int | |
implicit def Integer2intNullConflict(x: Null): Int | |
scala> implicits[Predef.type].matching[String => Any] > | |
implicit def augmentString(x: scala.Predef.String): scala.collection.immutable.StringOps | |
implicit def wrapString(s: scala.Predef.String): scala.collection.immutable.WrappedString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
needs more bippy