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 commit 0a6b444b49.
This reverts commit ed255596a6.
This reverts commit 3e01160a2f.
This reverts commit 96297b7e39.

Resolves: rdar://problem/60185506
This commit is contained in:
Pavel Yaskevich
2020-03-07 20:16:09 -08:00
parent c825ed8481
commit 0ecedfa5ea
14 changed files with 71 additions and 104 deletions

View File

@@ -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;
}