Merge pull request #70348 from hborla/cxx-generic-subscript

[cxx-interop] Allow imported subscript to have generic parameters.
This commit is contained in:
Holly Borla
2023-12-10 13:51:25 -08:00
committed by GitHub
6 changed files with 15 additions and 15 deletions

View File

@@ -1676,7 +1676,8 @@ SubscriptDecl *SwiftDeclSynthesizer::makeSubscript(FuncDecl *getter,
SubscriptDecl *subscript = SubscriptDecl::createImported(
ctx, name, getterImpl->getLoc(), bodyParams, getterImpl->getLoc(),
elementTy, dc, getterImpl->getClangNode());
elementTy, dc, getterImpl->getGenericParams(),
getterImpl->getClangNode());
subscript->setAccess(AccessLevel::Public);
AccessorDecl *getterDecl =