Advertisement
Guest User

Untitled

a guest
May 10th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.32 KB | None | 0 0
  1. trait Trait1[T] {}
  2.  
  3. class C1[T](t: Trait1[T])
  4.  
  5. trait Trait2 {
  6.   type T
  7. }
  8.  
  9. //In the specification for Trait2, how do you refer to C2's T in place of "???"?
  10. //"self.T" fails with "not found: self".
  11. //"C2#T" compiles, but does it mean what I think it does?
  12. class C2(t: Trait2 { type T = ??? }) {
  13.   self =>
  14.   type T
  15. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement