Merge pull request #23724 from brentdax/static-start

[NFC] Correct assumptions about static AbstractStorageDecls
This commit is contained in:
Brent Royal-Gordon
2019-04-02 17:16:27 -07:00
committed by GitHub
14 changed files with 102 additions and 87 deletions

View File

@@ -184,10 +184,8 @@ static AccessorDecl *createGetterPrototype(AbstractStorageDecl *storage,
auto *getterParams = buildIndexForwardingParamList(storage, {}, ctx);
SourceLoc staticLoc;
if (auto var = dyn_cast<VarDecl>(storage)) {
if (var->isStatic())
staticLoc = var->getLoc();
}
if (storage->isStatic())
staticLoc = storage->getLoc();
auto storageInterfaceType = storage->getValueInterfaceType();