Diagnostic circular class inheritance.

Break cycles agressively when we find circular class inheritance. The
stronger AST invariants prevent us from having to check for loops
everywhere in the front end.


Swift SVN r7325
This commit is contained in:
Doug Gregor
2013-08-19 15:31:13 +00:00
parent 64f178a016
commit 6c80f64c6e
7 changed files with 102 additions and 19 deletions

View File

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