Commits

Slava Pestov committed e8abf54a9a0
Sema: Fixes for protocol typealiases This is a big refactoring of resolveTypeInContext() which makes the function clearer to understand by merging various special cases and generalizing the logic for walking parent and superclass contexts to cover more cases. This improves typealiases in protocols a bit: 1) Previously a typealias in a protocol either had to be concrete, or consist of a single path of member types from Self, eg Self.A.B. Lift this restriction, so we can now write things like protocol Fireworks { associatedtype Exploding typealias Exploder = Exploding -> [Exploding] } 2) Protocol typealiases can now be accessed via qualified lookup on concrete types. Getting this working for unqualified lookup requires further refactorings which will be in a subsequent patch.