Sema: Subscript default arguments

Fixes <https://bugs.swift.org/browse/SR-6118>.
This commit is contained in:
Slava Pestov
2019-04-02 01:37:56 -04:00
parent 043d76a3bf
commit 6bb36b5c01
19 changed files with 308 additions and 44 deletions

View File

@@ -318,8 +318,10 @@ ResilienceExpansion DeclContext::getResilienceExpansion() const {
const ValueDecl *VD;
if (auto *FD = dyn_cast<AbstractFunctionDecl>(dc)) {
VD = FD;
} else if (auto *EED = dyn_cast<EnumElementDecl>(dc)) {
VD = EED;
} else {
VD = cast<EnumElementDecl>(dc);
VD = cast<SubscriptDecl>(dc);
}
auto access =