mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Handle presence of pack expansion type variables while matching
This commit is contained in:
committed by
Pavel Yaskevich
parent
c7ef47df0e
commit
ca534ef60a
@@ -3784,7 +3784,9 @@ struct TypeSimplifier {
|
||||
// Flatten single-element tuples containing type variables that cannot
|
||||
// bind to packs.
|
||||
auto typeVar = elementType->getAs<TypeVariableType>();
|
||||
if (!element.hasName() && typeVar && !typeVar->getImpl().canBindToPack()) {
|
||||
if (!element.hasName() && typeVar &&
|
||||
!typeVar->getImpl().canBindToPack() &&
|
||||
!typeVar->getImpl().isPackExpansion()) {
|
||||
return typeVar;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user