Revert "Sema: Fix materializeForSet overrides"

This commit is contained in:
Slava Pestov
2017-02-03 19:56:18 -08:00
committed by GitHub
parent 001cb77dae
commit 7ce643a637
3 changed files with 0 additions and 64 deletions

View File

@@ -814,20 +814,6 @@ static FuncDecl *addMaterializeForSet(AbstractStorageDecl *storage,
storage->getSetter());
storage->setMaterializeForSetFunc(materializeForSet);
// Make sure we record the override.
//
// FIXME: Instead, we should just not call checkOverrides() on
// storage until all accessors are in place.
if (auto *baseASD = storage->getOverriddenDecl()) {
// If the base storage has a private setter, we're not overriding
// materializeForSet either.
auto *baseMFS = baseASD->getMaterializeForSetFunc();
if (baseMFS != nullptr &&
baseASD->isSetterAccessibleFrom(storage->getDeclContext())) {
materializeForSet->setOverriddenDecl(baseMFS);
}
}
return materializeForSet;
}