mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Introduce PackElementType
This commit is contained in:
@@ -7308,6 +7308,13 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
return matchPackExpansionTypes(expansion1, expansion2, kind, subflags,
|
||||
locator);
|
||||
}
|
||||
|
||||
case TypeKind::PackElement: {
|
||||
auto pack1 = cast<PackElementType>(desugar1)->getPackType();
|
||||
auto pack2 = cast<PackElementType>(desugar2)->getPackType();
|
||||
|
||||
return matchTypes(pack1, pack2, kind, subflags, locator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7962,7 +7969,8 @@ ConstraintSystem::simplifyConstructionConstraint(
|
||||
case TypeKind::InOut:
|
||||
case TypeKind::Module:
|
||||
case TypeKind::Pack:
|
||||
case TypeKind::PackExpansion: {
|
||||
case TypeKind::PackExpansion:
|
||||
case TypeKind::PackElement: {
|
||||
// If solver is in the diagnostic mode and this is an invalid base,
|
||||
// let's give solver a chance to repair it to produce a good diagnostic.
|
||||
if (shouldAttemptFixes())
|
||||
|
||||
Reference in New Issue
Block a user