Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol P {
- associatedtype PType
- }
- public protocol Q {
- associatedtype QType: R
- }
- public protocol R {
- associatedtype RType
- }
- func f<T: P>(_: T) where T.PType.RType: Q, T.PType.RType.QType == T.PType {}
- // We get this signature: <T where T : P, T.PType : R, T.PType == T.PType.RType.QType, T.PType.RType : Q>
- // But we should get this signature: <T where T : P, T.PType == T.PType.RType.QType, T.PType.RType : Q>
- // The “T.PType: R” requirement is redundant, but pops up when building the canonical generic environment due to the recursion-breaking code being wrong.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement