Commits

Doug Gregor committed f847fe4a22e
Introduce basic support for type-checking the definitions of generic functions. This involves a few steps: - When assigning archetypes to type parameters, also walk all of the protocols to which the type parameter conforms and assign archetypes to each of the associated types. - When performing name lookup into an archetype, look into all of the protocols to which it conforms. If we find something, it can be referenced via the new ArchetypeMemberRefExpr. - When type-checking ArchetypeMemberRefExpr, substitute the values of the various associated types into the type of the member, so the resulting expression involves the archetypes for the enclosing generic method. The rest of the type checking essentially follows from the fact that archetypes are unique types which (therefore) have no behavior beyond what is provided via the protocols they conform to. However, there is still much work to do to ensure that we get the archetypes set up correctly. Swift SVN r2201