Skip to content

Commit 3a19ad4

Browse files
committed
address Pavel feedback
1 parent d059cf0 commit 3a19ad4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6269,7 +6269,7 @@ Type isPlaceholderVar(PatternBindingDecl *PB);
62696269
void dumpAnchor(ASTNode anchor, SourceManager *SM, raw_ostream &out);
62706270

62716271
/// 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.
62736273
bool isSingleUnlabeledPackExpansionTuple(Type type);
62746274

62756275
/// \returns null if \c type is not a single unlabeled pack expansion tuple.

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Type constraints::getPatternTypeOfSingleUnlabeledPackExpansionTuple(Type type) {
138138
if (isSingleUnlabeledPackExpansionTuple(type)) {
139139
auto tuple = type->getRValueType()->castTo<TupleType>();
140140
const auto &tupleElement = tuple->getElementType(0);
141-
if (auto *expansion = tupleElement->castTo<PackExpansionType>()) {
141+
if (auto *expansion = tupleElement->getAs<PackExpansionType>()) {
142142
return expansion->getPatternType();
143143
}
144144
if (auto *typeVar = tupleElement->getAs<TypeVariableType>()) {

0 commit comments

Comments
 (0)