Merge pull request #11045 from itaiferber/codable-class-fixes

Codable Class Fixes
This commit is contained in:
Itai Ferber
2017-07-24 15:42:45 -07:00
committed by GitHub
10 changed files with 559 additions and 130 deletions

View File

@@ -407,8 +407,9 @@ static bool canSynthesizeCodingKey(TypeChecker &tc, Decl *parentDecl,
return false;
}
if (!enumDecl->getInherited().empty() &&
enumDecl->getInherited().front().isError())
auto inherited = enumDecl->getInherited();
if (!inherited.empty() && inherited.front().wasValidated() &&
inherited.front().isError())
return false;
// If it meets all of those requirements, we can synthesize CodingKey