Created
March 18, 2020 17:57
-
-
Save cwalo/b6e9c615eab52700af327ba37f68bc0d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
protocol FooProtocol {} | |
protocol BarProtocol {} | |
protocol DootProtocol {} | |
typealias CompProtocol = FooProtocol & BarProtocol & DootProtocol | |
struct Dependencies: CompProtocol {} | |
struct SomeType { | |
let dependencies: FooProtocol & DootProtocol | |
init(_ dependencies: FooProtocol & DootProtocol) { | |
self.dependencies = dependencies | |
} | |
} | |
let dependencies = Dependencies() | |
let object = SomeType(dependencies) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment