@@ -14263,17 +14263,6 @@ void ConstraintSystem::addRestrictedConstraint(
1426314263 TMF_GenerateConstraints, locator);
1426414264}
1426514265
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-
1427714266/// Given that we have a conversion constraint between two types, and
1427814267/// that the given constraint-reduction rule applies between them at
1427914268/// the top level, apply it and generate any necessary recursive
@@ -14850,45 +14839,6 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
1485014839 if (worseThanBestSolution())
1485114840 return SolutionKind::Error;
1485214841
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});
1489214842 return SolutionKind::Solved;
1489314843 }
1489414844 }
0 commit comments