Closed as duplicate of#62906
Closed as duplicate of#62906
Description
Description
Cannot inherit from protocol type with generic argument
Steps to reproduce
protocol P<Q> {
associatedtype Q
}
struct S: P<Int> { // Cannot inherit from protocol type with generic argument 'P<Int>
}
Expected behavior
meantime it should be equivalent to the second form
struct S: P {
typealias Q = Int
}
Environment
- Swift compiler version info: swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
- Xcode version info: Xcode 14.2 Build version 14C18
- Deployment target: iOS 16.0