mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
392 B
Swift
15 lines
392 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
// https://github.com/apple/swift/issues/55588
|
|
|
|
public protocol Book {
|
|
associatedtype Name
|
|
}
|
|
public protocol BookDecorator: Book where Name == DecoratedBook.Name {
|
|
associatedtype DecoratedBook: Book
|
|
associatedtype Name = DecoratedBook.Name
|
|
}
|
|
public class ConcreteBookDecorator<T: Book>: BookDecorator {
|
|
public typealias DecoratedBook = T
|
|
}
|