mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Strip pack expansions off of pack reference types in
getUnopenedTypeOfReference.
This commit is contained in:
@@ -1282,6 +1282,10 @@ Type ConstraintSystem::getUnopenedTypeOfReference(
|
||||
Type requestedType =
|
||||
getType(value)->getWithoutSpecifierType()->getReferenceStorageReferent();
|
||||
|
||||
// Strip pack expansion types off of pack references.
|
||||
if (auto *expansion = requestedType->getAs<PackExpansionType>())
|
||||
requestedType = expansion->getPatternType();
|
||||
|
||||
// Adjust the type for concurrency if requested.
|
||||
if (adjustForPreconcurrency)
|
||||
requestedType = adjustVarTypeForConcurrency(
|
||||
|
||||
Reference in New Issue
Block a user