Skip to content

Commit 47b4d70

Browse files
committed
[ConstraintSystem] Remove unused r-value key path type element type variable
The resulting type is no longer in use so there is no need to create a type variable and a constraint to perform the operation.
1 parent 76046ba commit 47b4d70

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3690,12 +3690,8 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
36903690
getConstraintLocator(locator, ConstraintLocator::KeyPathSubscriptIndex),
36913691
/*options=*/0);
36923692
auto elementTy = createTypeVariable(
3693-
getConstraintLocator(locator, ConstraintLocator::FunctionArgument),
3694-
TVO_CanBindToLValue | TVO_CanBindToNoEscape);
3695-
auto elementObjTy = createTypeVariable(
36963693
getConstraintLocator(locator, ConstraintLocator::FunctionArgument),
3697-
TVO_CanBindToNoEscape);
3698-
addConstraint(ConstraintKind::Equal, elementTy, elementObjTy, locator);
3694+
TVO_CanBindToLValue | TVO_CanBindToNoEscape);
36993695

37003696
// The element result is an lvalue or rvalue based on the key path class.
37013697
addKeyPathApplicationConstraint(

0 commit comments

Comments
 (0)