@@ -1868,8 +1868,9 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
1868
1868
FunctionType::Param inputArg (input,
1869
1869
CS.getASTContext ().getIdentifier (" of" ));
1870
1870
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));
1873
1874
auto refType = FunctionType::get ({inputArg}, output);
1874
1875
return {refType, refType};
1875
1876
}
@@ -1883,9 +1884,8 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
1883
1884
auto escapeClosure = CS.createTypeVariable (
1884
1885
CS.getConstraintLocator (locator, ConstraintLocator::FunctionArgument),
1885
1886
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));
1889
1889
auto result = CS.createTypeVariable (
1890
1890
CS.getConstraintLocator (locator, ConstraintLocator::FunctionResult),
1891
1891
TVO_CanBindToNoEscape);
@@ -1916,9 +1916,8 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
1916
1916
auto existentialTy = CS.createTypeVariable (
1917
1917
CS.getConstraintLocator (locator, ConstraintLocator::FunctionArgument),
1918
1918
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));
1922
1921
auto result = CS.createTypeVariable (
1923
1922
CS.getConstraintLocator (locator, ConstraintLocator::FunctionResult),
1924
1923
TVO_CanBindToNoEscape);
@@ -3914,7 +3913,7 @@ void constraints::simplifyLocator(ASTNode &anchor,
3914
3913
3915
3914
case ConstraintLocator::AutoclosureResult:
3916
3915
case ConstraintLocator::LValueConversion:
3917
- case ConstraintLocator::RValueAdjustment :
3916
+ case ConstraintLocator::DynamicType :
3918
3917
case ConstraintLocator::UnresolvedMember:
3919
3918
case ConstraintLocator::ImplicitCallAsFunction:
3920
3919
// Arguments in autoclosure positions, lvalue and rvalue adjustments,
0 commit comments