Skip to content

Commit cdc38da

Browse files
Merge pull request #32309 from AnthonyLatsis/cs-openunbound-dead-param
[NFC] CS: Inline a parameter in openUnboundGenericType
2 parents 965c735 + bd23534 commit cdc38da

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,9 @@ Optional<std::pair<unsigned, Expr *>> ConstraintSystem::getExprDepthAndParent(
655655
return None;
656656
}
657657

658-
Type ConstraintSystem::openUnboundGenericType(UnboundGenericType *unbound,
659-
ConstraintLocatorBuilder locator,
660-
OpenedTypeMap &replacements) {
658+
Type
659+
ConstraintSystem::openUnboundGenericType(UnboundGenericType *unbound,
660+
ConstraintLocatorBuilder locator) {
661661
auto unboundDecl = unbound->getDecl();
662662
auto parentTy = unbound->getParent();
663663
if (parentTy) {
@@ -667,6 +667,7 @@ Type ConstraintSystem::openUnboundGenericType(UnboundGenericType *unbound,
667667
}
668668

669669
// Open up the generic type.
670+
OpenedTypeMap replacements;
670671
openGeneric(unboundDecl->getDeclContext(), unboundDecl->getGenericSignature(),
671672
locator, replacements);
672673

@@ -790,8 +791,7 @@ Type ConstraintSystem::openUnboundGenericType(
790791

791792
type = type.transform([&](Type type) -> Type {
792793
if (auto unbound = type->getAs<UnboundGenericType>()) {
793-
OpenedTypeMap replacements;
794-
return openUnboundGenericType(unbound, locator, replacements);
794+
return openUnboundGenericType(unbound, locator);
795795
}
796796

797797
return type;

lib/Sema/ConstraintSystem.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,8 +3411,7 @@ class ConstraintSystem {
34113411
///
34123412
/// \returns The opened type.
34133413
Type openUnboundGenericType(UnboundGenericType *unbound,
3414-
ConstraintLocatorBuilder locator,
3415-
OpenedTypeMap &replacements);
3414+
ConstraintLocatorBuilder locator);
34163415

34173416
/// "Open" the given type by replacing any occurrences of unbound
34183417
/// generic types with bound generic types with fresh type variables as

0 commit comments

Comments
 (0)