mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #70348 from hborla/cxx-generic-subscript
[cxx-interop] Allow imported subscript to have generic parameters.
This commit is contained in:
@@ -8831,6 +8831,7 @@ SubscriptDecl *SubscriptDecl::createImported(ASTContext &Context, DeclName Name,
|
||||
ParameterList *Indices,
|
||||
SourceLoc ArrowLoc, Type ElementTy,
|
||||
DeclContext *Parent,
|
||||
GenericParamList *GenericParams,
|
||||
ClangNode ClangN) {
|
||||
assert(ClangN && ElementTy);
|
||||
auto *DeclPtr = allocateMemoryForDecl<SubscriptDecl>(
|
||||
@@ -8839,7 +8840,7 @@ SubscriptDecl *SubscriptDecl::createImported(ASTContext &Context, DeclName Name,
|
||||
auto *const SD = ::new (DeclPtr)
|
||||
SubscriptDecl(Name, SourceLoc(), StaticSpellingKind::None, SubscriptLoc,
|
||||
Indices, ArrowLoc, /*ElementTyR=*/nullptr, Parent,
|
||||
/*GenericParams=*/nullptr);
|
||||
GenericParams);
|
||||
SD->setElementInterfaceType(ElementTy);
|
||||
SD->setClangNode(ClangN);
|
||||
return SD;
|
||||
|
||||
Reference in New Issue
Block a user