Advertisement
Guest User

Untitled

a guest
May 24th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. case class Special(v: String)
  2.  
  3. object Special {
  4. import scala.language.implicitConversions
  5. implicit def specialiser(v: String): Special = Special(v)
  6. }
  7.  
  8. object Main {
  9. def method(a: Special) = {
  10. println(a)
  11. }
  12.  
  13. def main(args: Array[String]) = {
  14. method("needs to be special")
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement