Skip to content

Commit 3064a00

Browse files
committed
AST: Use transformTypeParameterPacks() in getOpenedElementSignature()
1 parent d0202a7 commit 3064a00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/AST/ASTContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5867,13 +5867,13 @@ ASTContext::getOpenedElementSignature(CanGenericSignature baseGenericSig,
58675867
}
58685868

58695869
auto eraseParameterPackRec = [&](Type type) -> Type {
5870-
return type.transformRec([&](Type t) -> llvm::Optional<Type> {
5871-
if (auto *paramType = t->getAs<GenericTypeParamType>()) {
5870+
return type.transformTypeParameterPacks([&](SubstitutableType *t) -> llvm::Optional<Type> {
5871+
if (auto *paramType = dyn_cast<GenericTypeParamType>(t)) {
58725872
if (packElementParams.find(paramType) != packElementParams.end()) {
58735873
return Type(packElementParams[paramType]);
58745874
}
58755875

5876-
return t;
5876+
return Type(t);
58775877
}
58785878
return llvm::None;
58795879
});

0 commit comments

Comments
 (0)