Commits

Slava Pestov committed e373a559c6a
Sema: Fix type member lookup if generic signature validation fails When validateGenericFuncSignature() returns true, finalizeGenericParamList() is never called. Name lookup, via PartialGenericTypeToArchetypeResolver would return a dependent member type of the generic type parameter type, not an archetype as expected in this case. This would later on lead to a crash in ReplaceDependentTypes if the function body contained a reference to such a member type. Fix this by marking the GenericTypeParamDecls as invalid in this case, and returning an ErrorType from PartialGenericTypeToArchetypeResolver if given an invalid GenericTypeParamDecl. While we're at it, there was an unused isInvalid local variable in TypeCheckDecl::visitFuncDecl(). It was written to but never read. Replace the writes with calls to setInvalid(). Fixes <rdar://problem/19620340>. Swift SVN r30632