Sema: Correctly set parent type of local types looked up in context.

When an IdentifierType is resolved to a local type in the same decl context, we weren't setting the parent type correctly, causing blowups in type checking when a local type didn't have its generic parameters from context available. Set the parent type to the DeclaredTypeInContext of the type to which we resolved an unqualified lookup. Fixes <rdar://problem/12895793>.

Swift SVN r5084
This commit is contained in:
Joe Groff
2013-05-08 00:34:36 +00:00
parent c0a44f71c9
commit c75e1bb048
2 changed files with 2 additions and 1 deletions

View File

@@ -424,7 +424,7 @@ BoundGenericType::BoundGenericType(TypeKind theKind,
BoundGenericType *BoundGenericType::get(NominalTypeDecl *TheDecl,
Type Parent,
ArrayRef<Type> GenericArgs) {
ArrayRef<Type> GenericArgs) {
ASTContext &C = TheDecl->getDeclContext()->getASTContext();
llvm::FoldingSetNodeID ID;
bool HasTypeVariable = false;