Allow models to omit witnesses for optional protocol requirements.

Swift SVN r9962
This commit is contained in:
Doug Gregor
2013-11-05 16:28:34 +00:00
parent 6145fc3fa9
commit 0107e36e8b
6 changed files with 30 additions and 9 deletions

View File

@@ -800,6 +800,10 @@ namespace {
"should only consider objc conformances for extensions");
if (protocol->isObjC())
for (auto &mapping : conformance->getWitnesses()) {
// Missing optional requirement.
if (!mapping.second)
continue;
ValueDecl *vd = mapping.second.getDecl();
if (vd->getDeclContext() != TheExtension)
visit(vd);