@@ -1868,8 +1868,9 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
18681868 FunctionType::Param inputArg (input,
18691869 CS.getASTContext ().getIdentifier (" of" ));
18701870
1871- CS.addConstraint (ConstraintKind::DynamicTypeOf, output, input,
1872- CS.getConstraintLocator (locator, ConstraintLocator::RValueAdjustment));
1871+ CS.addConstraint (
1872+ ConstraintKind::DynamicTypeOf, output, input,
1873+ CS.getConstraintLocator (locator, ConstraintLocator::DynamicType));
18731874 auto refType = FunctionType::get ({inputArg}, output);
18741875 return {refType, refType};
18751876 }
@@ -1883,9 +1884,8 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
18831884 auto escapeClosure = CS.createTypeVariable (
18841885 CS.getConstraintLocator (locator, ConstraintLocator::FunctionArgument),
18851886 TVO_CanBindToNoEscape);
1886- CS.addConstraint (ConstraintKind::EscapableFunctionOf,
1887- escapeClosure, noescapeClosure,
1888- CS.getConstraintLocator (locator, ConstraintLocator::RValueAdjustment));
1887+ CS.addConstraint (ConstraintKind::EscapableFunctionOf, escapeClosure,
1888+ noescapeClosure, CS.getConstraintLocator (locator));
18891889 auto result = CS.createTypeVariable (
18901890 CS.getConstraintLocator (locator, ConstraintLocator::FunctionResult),
18911891 TVO_CanBindToNoEscape);
@@ -1916,9 +1916,8 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
19161916 auto existentialTy = CS.createTypeVariable (
19171917 CS.getConstraintLocator (locator, ConstraintLocator::FunctionArgument),
19181918 TVO_CanBindToNoEscape);
1919- CS.addConstraint (ConstraintKind::OpenedExistentialOf,
1920- openedTy, existentialTy,
1921- CS.getConstraintLocator (locator, ConstraintLocator::RValueAdjustment));
1919+ CS.addConstraint (ConstraintKind::OpenedExistentialOf, openedTy,
1920+ existentialTy, CS.getConstraintLocator (locator));
19221921 auto result = CS.createTypeVariable (
19231922 CS.getConstraintLocator (locator, ConstraintLocator::FunctionResult),
19241923 TVO_CanBindToNoEscape);
@@ -3914,7 +3913,7 @@ void constraints::simplifyLocator(ASTNode &anchor,
39143913
39153914 case ConstraintLocator::AutoclosureResult:
39163915 case ConstraintLocator::LValueConversion:
3917- case ConstraintLocator::RValueAdjustment :
3916+ case ConstraintLocator::DynamicType :
39183917 case ConstraintLocator::UnresolvedMember:
39193918 case ConstraintLocator::ImplicitCallAsFunction:
39203919 // Arguments in autoclosure positions, lvalue and rvalue adjustments,
0 commit comments