mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "[ConstraintSystem] Make it possible to infer subtype bindings through argument conversions"
Reverts apple/swift#30006. It caused a regression that we'd like to address before re-landing: ```swift struct X { var cgf: CGFloat } func test(x: X?) { let _ = (x?.cgf ?? 0) <= 0.5 } ``` This reverts commit0a6b444b49. This reverts commited255596a6. This reverts commit3e01160a2f. This reverts commit96297b7e39. Resolves: rdar://problem/60185506
This commit is contained in:
@@ -9221,8 +9221,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(
|
||||
// subscript, which requires changes to declaration to become mutable.
|
||||
if (auto last = locator.last()) {
|
||||
impact += (last->is<LocatorPathElt::FunctionResult>() ||
|
||||
last->is<LocatorPathElt::SubscriptMember>() ||
|
||||
last->is<LocatorPathElt::KeyPathDynamicMember>())
|
||||
last->is<LocatorPathElt::SubscriptMember>())
|
||||
? 1
|
||||
: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user