Sema: Validate addressors when an AbstractStorageDecl is validated

Previously we were relying on the 'validate for layout' path
validating these, but that's going to change.
This commit is contained in:
Slava Pestov
2017-01-07 16:26:37 -08:00
parent 7731d4c6cb
commit 208dec74d0
2 changed files with 31 additions and 37 deletions

View File

@@ -776,7 +776,7 @@ static void addTrivialAccessorsToStorage(AbstractStorageDecl *storage,
if (isDynamic)
setter->getAttrs().add(new (TC.Context) DynamicAttr(IsImplicit));
// Synthesize and type-check the body of the setter.
// Synthesize the body of the setter.
synthesizeTrivialSetter(setter, storage, setterValueParam, TC);
}
@@ -800,7 +800,7 @@ synthesizeSetterForMutableAddressedStorage(AbstractStorageDecl *storage,
assert(storage->getStorageKind() ==
AbstractStorageDecl::ComputedWithMutableAddress);
// Synthesize and type-check the body of the setter.
// Synthesize the body of the setter.
VarDecl *valueParamDecl = getFirstParamDecl(setter);
synthesizeTrivialSetter(setter, storage, valueParamDecl, TC);
}