mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
20 lines
343 B
Swift
20 lines
343 B
Swift
// RUN: %target-swift-frontend %s -typecheck
|
|
|
|
struct Bar : BarProtocol {
|
|
typealias Element = Int
|
|
}
|
|
|
|
struct Foo: FooProtocol {
|
|
typealias Things = Bar
|
|
func thing() -> Thing {}
|
|
}
|
|
|
|
protocol BarProtocol {
|
|
associatedtype Element
|
|
}
|
|
|
|
protocol FooProtocol {
|
|
associatedtype Things: BarProtocol
|
|
typealias Thing = Things.Element
|
|
}
|