mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user