AST: BoundGenericType should inherit recursive properties from its parent

I don't think this caused any problems until now, but it will
come up once the parent type can itself be a BoundGenericType,
because then we need to inherit recursive properties from the
generic arguments.
This commit is contained in:
Slava Pestov
2016-06-13 18:39:20 -07:00
parent 48fe73f36e
commit 448fa67cf8

View File

@@ -2621,6 +2621,8 @@ BoundGenericType *BoundGenericType::get(NominalTypeDecl *TheDecl,
ASTContext &C = TheDecl->getDeclContext()->getASTContext();
llvm::FoldingSetNodeID ID;
RecursiveTypeProperties properties;
if (Parent)
properties |= Parent->getRecursiveProperties();
BoundGenericType::Profile(ID, TheDecl, Parent, GenericArgs, properties);
auto arena = getArena(properties);