Skip to content

Instantly share code, notes, and snippets.

@rabitarochan
Created June 14, 2012 00:30
Show Gist options
  • Save rabitarochan/2927368 to your computer and use it in GitHub Desktop.
Save rabitarochan/2927368 to your computer and use it in GitHub Desktop.
implicitをまだ理解しきれてない
object Test {
implicit def int2String(x: Int): String = x.toString
}
// defined module Test
import Test._
val num = 123
num.mkString("\n")
// error: value mkString is not a member of Int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment