Advertisement
Guest User

Trait implicit chunks

a guest
Jan 26th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.39 KB | None | 0 0
  1. trait Ok[R] {}
  2. trait QV_StorableTest[R] {
  3.     def method(implicit rok: Ok[R]): String
  4. }
  5. object testTuples {
  6.     implicit val IntInt = new Ok[(Int, Int)] {}
  7.     implicit val DoubleInt = new Ok[(Double, Int)] {}
  8. }
  9. trait TestTrait[R] extends QV_StorableTest[R]{
  10.     val prefix: String = "test"
  11.     def method(implicit rok: Ok[R]): String = "test"
  12. }
  13. object testObject extends TestTrait[(String, String)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement