mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
257 B
Swift
18 lines
257 B
Swift
protocol FooBaseProto {}
|
|
|
|
protocol FooProto: FooBaseProto {}
|
|
|
|
protocol BarProto {
|
|
associatedtype Foo: FooProto
|
|
init(foo: Foo)
|
|
}
|
|
|
|
protocol BazProto {
|
|
associatedtype Bar: BarProto
|
|
init(bar: Bar)
|
|
}
|
|
|
|
struct BarImpl: BarProto {
|
|
init(foo: FooImpl) {}
|
|
}
|