What does "=>" mean in the example below?
trait MyService[E <: Entity[ID]] extends Management {
this: Repository[E] =>
// some code
}
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]
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.