diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index a42d0cf545b1b..d75be69713b7a 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -7958,6 +7958,9 @@ void Parser::parseTopLevelAccessors( consumeTokenWithoutFeedingReceiver(); ParameterList *indices = nullptr; + if (auto subscript = dyn_cast(storage)) + indices = subscript->getIndices(); + bool hadLBrace = consumeIf(tok::l_brace); // Prepopulate the field for any accessors that were already parsed parsed accessors