4

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

trait MyService[E <: Entity[ID]] extends Management {
    this: Repository[E] =>
    // some code
}
RaKXeR
  • 142
  • 1
  • 15
JohnWinter
  • 943
  • 5
  • 11
  • 22
  • 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
  • 2,981
  • 12
  • 19