Closed
Description
It doesn't seem possible for a struct to inherit a protocol with primary associated type using this primary associated type in the declaration. In other words, the following doesn't compile:
protocol P<A> {
associatedtype A
}
struct B {}
struct T: P<B> {} // Error: Cannot inherit from protocol type with generic argument 'P<B>'
This configuration was however explicitly mentioned in SE-0346, so I don't know if this is a bug, a regression, or feature that was not implemented at the end.
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: Version 14.2 (14C18)
- Deployment target: macOS 13.1