Some requirement machine work
Rename requirement to Value
Rename more things to Value
Fix integer checking for requirement
some docs and parser changes
Minor fixes
This expands the downgrade for Objective-C requirements to all requirements
until strict concurrency checking is enabled (either via a flag in Swift 5
language mode or by switching to Swift 6 language mode).
Resolves: rdar://134503878
For the purposes of availability calculations, direct use of
`llvm::VersionTuple` and `VersionRange` is discouraged, since these fundamental
version representations are divorced from their context. For example, comparing
an iOS platform version to a visionOS platform version is invalid since the
versioning systems of the two platforms differ. Although visionOS inherits
avialability from iOS, an iOS version must be converted to a visionOS version
prior to comparison. In the future, `AvailabilityContext` can be enriched to
carry the information necessary to verify that its algebraic operations are
being performed on compatible values.
NFC.
`UnavailabilityReason` does not live up to its name because it only models
potential unavailability due to an unmet OS version requirement. It does not
model unavailability caused by explicit annotation, language mode requirements,
obsoletion, etc. `AvailabilityContext` already models an OS version
requirement, so use it instead.
NFC.
An `AvailabilityContext` represents an abstract version range in which
something is available. In the future, these version ranges may not necessarily
always correspond to operating system version ranges.
NFC.
In situations like:
```
class A {
func test() {}
}
```
Fully uncurried function type should be @Sendable but inner method
cannot be because it captures a non-Sendable type `A` when applied.
mismatch.
The actor isolation checker was setting the actor value for
`#isolation` when type checking the expression failed. Later on, the
isolation checker would crash when querying the type of the actor, e.g.
to check if it's a distributed actor. Instead, keep the actor value as
null if there's a type mismatch.
SE-0364 was amended to allow same-package conformances to be considered
non-retroactive. The logic for that ammendment was implemented in Swift 6.0,
but the diagnostics were not updated.
Resolves rdar://133423931.
We used to detect partial applications based on member locators
and parent expressions, but using function reference kind +
check to see if self is applied is such simpler and hits both
uses of `isPartialApplication`.
Replace the existing C++ implementation of extractInlinableText with
a new implementation based on swift-syntax. It uses SwiftIfConfig to
remove inactive regions (with a special mode), and a new compiler-only
entrypoint in the library to remove comments and `#sourceLocation`.
Increases the default score of the `treat r-value as l-value`
and decrease the impact if the immediate member is settable
because that means that the problem is somewhere in the "base".
Placeholders propagate but we still can allow contextual inference,
to facilitate that the solver should consider `l-value object` constraint
to be solved and allow placeholders on "object" type.