This will ensure that we do not break anyone who has adopted APIs like
CheckedContinuation.resume that now have sending parameters.
An example of where this can come up is shown by the ProcessType in SwiftToolsCore:
```swift
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@discardableResult
public func waitUntilExit() async throws -> ProcessResult {
try await withCheckedThrowingContinuation { continuation in
DispatchQueue.processConcurrent.async {
self.waitUntilExit(continuation.resume(with:))
}
}
}
```
This fails to compile since self.waitUntilExit doesn't expect a function that
takes a sending parameter. We want to give people time to fix such issues.
Removing the old, ad-hoc diagnostics code improves the diagnostics we
emit, since the existing diagnostics for missing conformances is already
pretty good.
rdar://127369509
If the contextual type propagated into the optional chain mismatches with
the inner type formed from its member references and that inner type
is a result of some fix, let's consider that un-salvageable and avoid
producing additional "ignore contextual type" fixes which only lead
to subpar solutions.
I'm not really convinced that this shouldn't be done by introducing a new
kind of constraint rather than hacking in what are essentially conversions
as "bind" constraints, but this is the most direct path for now.
Fixes rdar://125394096
The condition that the conforming type satisfies the superclass bound
of the conformed protocol is already covered by the conformance constraint
itself.
Since importer ignored `swift_attr` that appeared in a type context
until recently we need to maintain status quo with concurrency stripping
from ObjC requirements in modes that don't have full concurrency
checking enabled.
Even if the member type variable is partially resolved, we still need
to mark inner type variables (if any) as holes because they might not
be connected to anything that could provide contextual type(s).
Resolves: rdar://124549952
To maintain source compatibility, SE-0352 does not open existentials
with "self-conforming" type, such as `any Error` or existentials based
on `@objc` protocols. The proposal specified that this behavior would
change in Swift 6. Implement that behavior change, which can be
enabled prior to Swift 6 with the upcoming feature
`ImplicitOpenExistentials` (as documented in SE-0362).
Fixes#70873 / rdar://120902975.
Although inference doesn't allow direct bindings to
type variables, they can still get through via `matchTypes`
when type is a partially resolved pack expansion that simplifies
down to a type variable.
When a NoncopyableGenericsMismatch happens between the compiler and
stdlib, allow the compiler to rebuild the stdlib from its interface
instead of exiting with an error.