You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SIL] The Self type of a protocol can conform to multiple protocols.
Through a same-type constraint on an associated type, the Self type of
a protocol can conform to multiple protocols that are not related by
direct inheritance. There were two places that incorrectly assumed
that this didn't happen:
1) The SIL verifier checked that the archetype for Self conformed to
only a single protocol. This only tripped up +Asserts builds, and had
no effect on code generation. Change it to ensure that the archetype
for Self conforms to the expected protocol.
2) SILFunctionType's getDefaultWitnessMethodProtocol() asserted that
the Self type of a protocol only conformed to a single protocol, and
then returned the first protocol in the list. This could end up
returning the wrong protocol, in turn producing an incorrect
substitution list in IRGen. Change it to return the protocol from the
constraint in the generic signature.
Fixes SR-9848 / rdar://problem/47767506.
0 commit comments