Skip to content

Instantly share code, notes, and snippets.

@Yuichiroh
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yuichiroh/e7e28489b389a6db73d8 to your computer and use it in GitHub Desktop.
Save Yuichiroh/e7e28489b389a6db73d8 to your computer and use it in GitHub Desktop.
object OverloadSample {
implicit class B2I(f: Boolean => Int)
implicit class I2I(f: Int => Int)
def foo(func: B2I): Unit = {
println("test")
}
def foo(func: I2I): Unit = {
println("test")
}
def main(args: Array[String]): Unit = {
val test = (tf: Boolean) => 0
foo(test)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment