Last active
September 14, 2017 15:10
-
-
Save DmytroMitin/c75df4d66e280d792a72ab40b3890e16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Search { | |
type T | |
} | |
trait WriterSearch extends Search { | |
override type T <: Writer | |
} | |
trait BookSearch extends Search { | |
override type T <: Book | |
} | |
trait AllSearch extends WriterSearch with BookSearch { | |
override type T = Writer with Book | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Search[T] | |
trait WriterSearch[T <: Writer] extends Search[T] | |
trait BookSearch[T <: Book] extends Search[T] | |
trait AllSearch extends WriterSearch[Book with Writer] with BookSearch[Book with Writer] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment