Reimplement circularly check for protocol inheritance.

First, make it actually check for cycles properly. Second, pull it
into the checking of the protocol itself, rather than keeping it as a
separate pass that happens too late to be useful. Finally, put the
unchecked/checking/checked bits into the AST to avoid having to keep a
separate DenseMap just for this purpose. Fixes <rdar://problem/14750346>.


Swift SVN r7324
This commit is contained in:
Doug Gregor
2013-08-19 14:50:29 +00:00
parent b8f9e53c37
commit 64f178a016
5 changed files with 86 additions and 72 deletions

View File

@@ -1036,6 +1036,7 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
assert(members.hasValue() && "could not read struct members");
proto->setMembers(members.getValue(), SourceRange());
proto->setCheckedInheritanceClause();
proto->setCircularityCheck(CircularityCheck::Checked);
break;
}