Commits

Slava Pestov committed 09c57d32c7d
AST: Fix some nested generics issues exposed by generic initializer inheritance BoundGenericType::getSubsitutions() would only look at the bound generic arguments of the innermost type, ignoring parent types. However, it would then proceed to walk the AllArchetypes list of all outer generic parameter lists when forming the final result. The gatherAllSubstitutions() would also walk through parent types. As a result, outer generic parameters would appear multiple times. Simplify gatherAllSubstitutions() to just skip to the innermost BoundGenericType, and delegate to getSubsitutions() for the rest. Most calls to gatherAllSubstitutions() are from SILGen it seems, and fix only fixes one compiler_crasher. However an upcoming patch adds a new call to gatherAllSubstitutions() which caused some crashers to regress, so I'm going to fix it properly here.