fork download
  1. object Main extends Application {
  2. case class ParameterA(l:List[Int])
  3. case class ParameterB(l:List[String])
  4. implicit def toParameterA(l:List[Int]) = ParameterA(l)
  5. implicit def toParameterB(l:List[String]) = ParameterB(l)
  6. def f(l:ParameterA) = println(l)
  7. def f(l:ParameterB) = println(l)
  8. f(List(1))
  9. f(List("hello"))
  10. }
  11.  
Success #stdin #stdout 0.18s 211776KB
stdin
Standard input is empty
stdout
ParameterA(List(1))
ParameterB(List(hello))