Sema: Record opened pack expansion types in the trail

This commit is contained in:
Slava Pestov
2024-10-01 14:31:56 -04:00
parent 7d3350d0f2
commit 9afb1a960b
5 changed files with 45 additions and 9 deletions

View File

@@ -1263,6 +1263,15 @@ Type ConstraintSystem::openPackExpansionType(PackExpansionType *expansion,
return expansionVar;
}
void ConstraintSystem::recordOpenedPackExpansionType(PackExpansionType *expansion,
TypeVariableType *expansionVar) {
bool inserted = OpenedPackExpansionTypes.insert({expansion, expansionVar}).second;
if (inserted) {
if (isRecordingChanges())
recordChange(SolverTrail::Change::recordedOpenedPackExpansionType(expansion));
}
}
Type ConstraintSystem::openOpaqueType(OpaqueTypeArchetypeType *opaque,
ConstraintLocatorBuilder locator) {
auto opaqueDecl = opaque->getDecl();