Created
February 21, 2017 05:12
-
-
Save NobukazuHanada/9046ef67f363de82e7cd5854d676652c to your computer and use it in GitHub Desktop.
This file contains 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
object Main extends App{ | |
class Hoge | |
def createValue : Hoge = new Hoge | |
implicit def toInt(x:Hoge) : Int = 3 | |
implicit def toString(x:Hoge) : String = "pa" | |
val a : Int = createValue | |
println(a) | |
val b : String = createValue | |
println(b) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment