ITADN

Protocol confoming to recursive protocol doesn't work well with where equal constraint to `Bar` and also conforming `Bar` to the same protocol

#90249Openatifdev10 创建于 2026-06-28
triage needed
A
atifdev10commented
### Description _No response_ ### Reproduction ```swift protocol Foo { associatedtype T: Foo } protocol FooBar: Foo where T == Bar {} struct Bar: FooBar {} ``` ### Expected behavior I should compile without an issue. ### Environment Apple Swift version 6.3.2 (swift-6.3.2-RELEASE) Target: x86_64-apple-macosx15.0 ### Additional information Using it with a `typealias` instead of a where constraint seems to be workaround but it results in a compiler warning telling you to use a where constraint instead, which doesn't work.
0 条评论