Commits
Doug Gregor committed aef8110375e
Switch archetype assignment for protocols over to the archetype builder. For this to work, the 'parameter' used to seed the archetype builder is the 'This' associated type, which implicitly conforms to the protocol. All other archetype assignments flow from that archetype. In the same vein, when faking a polymorphic function type for an operator found within a protocol, we only need to substitute for the 'This' associated type. The rest are derived due to the implicit requirement that 'This' conforms to its protocol. Finally, because archetype assignment within protocols occurs during type-checking, and that archetype assignment may visit any protocol visible in the translation unit, we need to validate the types used in archetype assignment for *all* protocols before attempting archetype assignment on any one protocol. Thus, perform this type validation before the main declaration type-checking phase. Swift SVN r2436