Commits
Doug Gregor committed 9320e0fb418
Type-check generic function signatures before building archetypes. Type-check the parameter patterns and result type of a generic function before assigning archetypes, which potentially produces a dependent function type. Then, assign archetypes to the generic parameters, revert all of the dependent types, and validate the types again (now with archetypes), so the rest of the frontend can (temporarily) continue to traffic in archetypes. The type-check, revert, type-check behavior is a bit odd. We want to re-process the TypeReprs because they have all of the source-location information necessary to produce proper diagnostics, but from this processing we will eventually need to produce two types: the type for the signature (as viewed from the outside), which will involve generic parameters, and the type for the definition, which will involve archetypes. Swift SVN r7504