SIL: Lower dependent member types when substituted into context.

AST context substitution may produce a metatype, function type, or other type that requires lowering. Handle this special case to fix a crash when emitting protocol conformances with metatypes or functions as associated types. <rdar://problem/17501507>

Swift SVN r19580
This commit is contained in:
Joe Groff
2014-07-05 17:48:05 +00:00
parent 6b45c481eb
commit af160e9c7b
4 changed files with 87 additions and 6 deletions

View File

@@ -254,11 +254,7 @@ public:
/// Map the given type, which is based on an interface SILFunctionType and may
/// therefore be dependent, to a type based on the context archetypes of this
/// SILFunction.
SILType mapTypeIntoContext(SILType type) const {
return SILType::getPrimitiveType(
mapTypeIntoContext(type.getSwiftRValueType())->getCanonicalType(),
type.getCategory());
}
SILType mapTypeIntoContext(SILType type) const;
//===--------------------------------------------------------------------===//
// Block List Access