Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement