4

What does "=>" mean in the example below?

trait MyService[E <: Entity[ID]] extends Management {
    this: Repository[E] =>
    // some code
}
RaKXeR
  • 152
  • 2
  • 16
JohnWinter
  • 1,003
  • 5
  • 12
  • 25
  • To the closevoters: this is neither too broad nor a duplicate (of what you linked). This should stay open unless there's a more specific duplicate – Daenyth Jun 04 '15 at 13:53

1 Answers1

8

In this example it means that this has to be of the type Repository[E]. That means that the trait MyService can only be mixed into classes extending Repository[E].

Gregor Raýman
  • 3,051
  • 13
  • 19