We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1c4196 commit 5689f65Copy full SHA for 5689f65
lib/AST/DeclContext.cpp
@@ -214,8 +214,10 @@ AccessorDecl *DeclContext::getInnermostPropertyAccessorContext() {
214
return nullptr;
215
216
auto *storage = accessor->getStorage();
217
- if (isa<VarDecl>(storage) && storage->getDeclContext()->isTypeContext())
+ if ((isa<VarDecl>(storage) || isa<SubscriptDecl>(storage)) &&
218
+ storage->getDeclContext()->isTypeContext()) {
219
return accessor;
220
+ }
221
}
222
} while ((dc = dc->getParent()));
223
0 commit comments