mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #85525 from hamishknight/yeet
[CS] Remove `getImplicitValueConversionLocator` & `ImplicitConversion`
This commit is contained in:
@@ -7743,16 +7743,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
isExpr<ForcedCheckedCastExpr>(anchor);
|
||||
};
|
||||
|
||||
if (!isCGFloatInit(anchor) && !isCoercionOrCast(anchor, path) &&
|
||||
llvm::none_of(path, [&](const LocatorPathElt &rawElt) {
|
||||
if (auto elt =
|
||||
rawElt.getAs<LocatorPathElt::ImplicitConversion>()) {
|
||||
auto convKind = elt->getConversionKind();
|
||||
return convKind == ConversionRestrictionKind::DoubleToCGFloat ||
|
||||
convKind == ConversionRestrictionKind::CGFloatToDouble;
|
||||
}
|
||||
return false;
|
||||
})) {
|
||||
if (!isCGFloatInit(anchor) && !isCoercionOrCast(anchor, path)) {
|
||||
conversionsOrFixes.push_back(
|
||||
desugar1->isCGFloat()
|
||||
? ConversionRestrictionKind::CGFloatToDouble
|
||||
@@ -11035,10 +11026,6 @@ static ConstraintFix *validateInitializerRef(ConstraintSystem &cs,
|
||||
if (!anchor)
|
||||
return nullptr;
|
||||
|
||||
// Avoid checking implicit conversions injected by the compiler.
|
||||
if (locator->findFirst<LocatorPathElt::ImplicitConversion>())
|
||||
return nullptr;
|
||||
|
||||
auto getType = [&cs](Expr *expr) -> Type {
|
||||
return cs.simplifyType(cs.getType(expr))->getRValueType();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user