Created
September 24, 2019 12:58
-
-
Save PiotrJander/441236d3bf7e4950d6fea62a4b1582db 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
// Suppose that `ComponentB` requires capabilities `ServiceC` and `ServiceD`, | |
// and that it internally uses a `ComponentA`. Is there any way `ComponentB` | |
// can pass its capabilities to `ComponentA`? | |
trait ServiceC | |
trait LiveServiceC extends ServiceC | |
trait ServiceD | |
trait LiveServiceD extends ServiceD | |
class ComponentA { this: ServiceC => | |
} | |
class ComponentB { this: ServiceC with ServiceD => | |
val a = new ComponentA with ??? | |
} | |
new ComponentB with LiveServiceC with LiveServiceD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment