AST: Initial plumbing for generic subscripts

This commit is contained in:
Slava Pestov
2017-02-19 20:33:46 -08:00
parent b319a3aa32
commit 880803aaba
6 changed files with 38 additions and 13 deletions

View File

@@ -3379,8 +3379,10 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext) {
argNames.push_back(getIdentifier(argNameID));
DeclName name(ctx, ctx.Id_subscript, argNames);
// FIXME: Serialize generic subscripts
auto subscript = createDecl<SubscriptDecl>(name, SourceLoc(), nullptr,
SourceLoc(), TypeLoc(), DC);
SourceLoc(), TypeLoc(), DC,
/*GenericParams=*/nullptr);
declOrOffset = subscript;
subscript->setIndices(readParameterList());