File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6269,7 +6269,7 @@ Type isPlaceholderVar(PatternBindingDecl *PB);
6269
6269
void dumpAnchor (ASTNode anchor, SourceManager *SM, raw_ostream &out);
6270
6270
6271
6271
// / Check whether the type is a tuple consisting of a single unlabeled element
6272
- // / of \c PackExpansionType.
6272
+ // / of \c PackExpansionType or a type variable that represents a pack expansion type .
6273
6273
bool isSingleUnlabeledPackExpansionTuple (Type type);
6274
6274
6275
6275
// / \returns null if \c type is not a single unlabeled pack expansion tuple.
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ Type constraints::getPatternTypeOfSingleUnlabeledPackExpansionTuple(Type type) {
138
138
if (isSingleUnlabeledPackExpansionTuple(type)) {
139
139
auto tuple = type->getRValueType()->castTo<TupleType>();
140
140
const auto &tupleElement = tuple->getElementType(0);
141
- if (auto *expansion = tupleElement->castTo <PackExpansionType>()) {
141
+ if (auto *expansion = tupleElement->getAs <PackExpansionType>()) {
142
142
return expansion->getPatternType();
143
143
}
144
144
if (auto *typeVar = tupleElement->getAs<TypeVariableType>()) {
You can’t perform that action at this time.
0 commit comments