Sema: Remove validateAbstractStorageDecl()

Validating a variable or subscript no longer forces accessor synthesis.
This commit is contained in:
Slava Pestov
2019-07-09 16:21:55 -04:00
parent 15a831614e
commit ecc9e32f13
2 changed files with 16 additions and 21 deletions

View File

@@ -1404,6 +1404,10 @@ void TypeChecker::synthesizeWitnessAccessorsForStorage(
AbstractStorageDecl *storage) {
bool addedAccessor = false;
// Make sure the protocol requirement itself has the right accessors.
// FIXME: This should be a request kicked off by SILGen.
DeclsToFinalize.insert(requirement);
requirement->visitExpectedOpaqueAccessors([&](AccessorKind kind) {
// If the accessor already exists, we have nothing to do.
if (storage->getAccessor(kind))