mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #77683 from slavapestov/opened-type-optzn
Sema: Clean up and optimize interface type opening
This commit is contained in:
@@ -11534,10 +11534,9 @@ static Type getOpenedResultBuilderTypeFor(ConstraintSystem &cs,
|
||||
// Find the opened type for this callee and substitute in the type
|
||||
// parameters.
|
||||
auto substitutions = cs.getOpenedTypes(calleeLocator);
|
||||
if (!substitutions.empty()) {
|
||||
OpenedTypeMap replacements(substitutions.begin(), substitutions.end());
|
||||
builderType = cs.openType(builderType, replacements, locator);
|
||||
}
|
||||
if (!substitutions.empty())
|
||||
builderType = cs.openType(builderType, substitutions, locator);
|
||||
|
||||
assert(!builderType->hasTypeParameter());
|
||||
}
|
||||
return builderType;
|
||||
|
||||
Reference in New Issue
Block a user