@@ -14263,17 +14263,6 @@ void ConstraintSystem::addRestrictedConstraint(
14263
14263
TMF_GenerateConstraints, locator);
14264
14264
}
14265
14265
14266
- void ConstraintSystem::recordImplicitValueConversion(
14267
- ConstraintLocator *locator,
14268
- ConversionRestrictionKind restriction) {
14269
- bool inserted = ImplicitValueConversions.insert(
14270
- {getConstraintLocator(locator), restriction}).second;
14271
- ASSERT(inserted);
14272
-
14273
- if (solverState)
14274
- recordChange(SolverTrail::Change::RecordedImplicitValueConversion(locator));
14275
- }
14276
-
14277
14266
/// Given that we have a conversion constraint between two types, and
14278
14267
/// that the given constraint-reduction rule applies between them at
14279
14268
/// the top level, apply it and generate any necessary recursive
@@ -14850,45 +14839,6 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
14850
14839
if (worseThanBestSolution())
14851
14840
return SolutionKind::Error;
14852
14841
14853
- auto *conversionLoc =
14854
- getImplicitValueConversionLocator(locator, restriction);
14855
-
14856
- auto *applicationLoc =
14857
- getConstraintLocator(conversionLoc, ConstraintLocator::ApplyFunction);
14858
-
14859
- auto *memberLoc = getConstraintLocator(
14860
- applicationLoc, ConstraintLocator::ConstructorMember);
14861
-
14862
- // Allocate a single argument info to cover all possible
14863
- // Double <-> CGFloat conversion locations.
14864
- auto *argumentsLoc =
14865
- getConstraintLocator(conversionLoc, ConstraintLocator::ApplyArgument);
14866
-
14867
- if (!ArgumentLists.count(argumentsLoc)) {
14868
- auto *argList = ArgumentList::createImplicit(
14869
- getASTContext(), {Argument(SourceLoc(), Identifier(), nullptr)},
14870
- /*firstTrailingClosureIndex=*/std::nullopt,
14871
- AllocationArena::ConstraintSolver);
14872
- recordArgumentList(argumentsLoc, argList);
14873
- }
14874
-
14875
- auto *memberTypeLoc = getConstraintLocator(
14876
- applicationLoc, LocatorPathElt::ConstructorMemberType());
14877
-
14878
- auto *memberTy = createTypeVariable(memberTypeLoc, TVO_CanBindToNoEscape);
14879
-
14880
- addValueMemberConstraint(MetatypeType::get(type2, getASTContext()),
14881
- DeclNameRef(DeclBaseName::createConstructor()),
14882
- memberTy, DC,
14883
- FunctionRefInfo::doubleBaseNameApply(),
14884
- /*outerAlternatives=*/{}, memberLoc);
14885
-
14886
- addConstraint(ConstraintKind::ApplicableFunction,
14887
- FunctionType::get({FunctionType::Param(type1)}, type2),
14888
- memberTy, applicationLoc);
14889
-
14890
- ImplicitValueConversions.insert(
14891
- {getConstraintLocator(locator), restriction});
14892
14842
return SolutionKind::Solved;
14893
14843
}
14894
14844
}
0 commit comments