Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. object Main extends App{
  2. class Hoge
  3. def createValue : Hoge = new Hoge
  4.  
  5. implicit def toInt(x:Hoge) : Int = 3
  6. implicit def toString(x:Hoge) : String = "pa"
  7.  
  8. val a : Int = createValue
  9. println(a)
  10. val b : String = createValue
  11. println(b)
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement