• ObjCImplementation controls @implementation on extensions
• CImplementation controls @implementation and @_objcImplementation on cdecl functions
Why the difference between them? Because `@_objcImplementation extension` has already been adopted pretty widely, while `@_objcImplementation @_cdecl` is very new.
A source-compatibility hack to not resolve AsyncSequence.Failure via
lookup accidentally disabled the `@_implements`-based lookup that
we use to avoid having to run inference again in Swift textual
interfaces. Tweak the logic here to narrow the source-compatibilty
hack.
Fixes rdar://125320522.
Pitch - https://github.com/apple/swift-evolution/pull/2305
Changes highlights:
dependsOn(paramName) and dependsOn(scoped argName) syntax
dependsOn(paramName) -> copy lifetime dependence for all parameters/self except
when we have Escapable parameters/self, we assign scope
lifetime dependence.
Allow lifetime dependence on parameters without ownership modifier.
Always infer copy lifetime dependence except when we have
Escapable parameters/self, we infer scope lifetime dependence.
Allow lifetime dependence inference on parameters without ownership modifier.
None of the diagnostics in MiscDiagnostics make a distinction between
sendable or actor-isolated function references which means that we can
skip conversions while reaching for a declaration used in an application.
The condition that the conforming type satisfies the superclass bound
of the conformed protocol is already covered by the conformance constraint
itself.
In the following example, the writeback via the property `b` should be
diagnosed since `b`'s setter is unavailable:
```
struct A {
struct B {
var x: Int = 0
}
private var _b: B = B()
var b: B {
get { _b }
@available(*, unavailable) set {
_b = newValue
}
}
}
var a = A()
a.b.x = 1
```
Resolves rdar://125019717
Fixes the missing diagnostic about the availability of the setter of `x` in the
following example:
```
struct S {
var x: Int {
get { 0 }
@available(*, unavailable) set {}
}
}
var s = S()
s[keyPath: \.x] = 1
```
Resolves rdar://124977727
of a closure in a `@preconcurrency` context.
Instead, downgrade any diagnostics about non-`Sendable` captures using the
`.limitBehaviorUntilSwiftVersion` mechanism like other preconcurrency errors
that are suppressed in minimal checking. Stripping `@Sendable` from closure
types actually changes the isolation of the closure, because non-`Sendable`
closures are isolated to the context they're formed in, which leads to bogus
dynamic assertion failures under `-enable-actor-data-race-checks`.
The recent deprecation of the set accessor for `CommandLine.arguments` exposed
a bug in availability checking:
```
for arg in CommandLine.arguments[1...] {
╰─ warning: setter for 'arguments' is deprecated: ...
```
The parser generates an `InOutExpr` in the AST for the subscript access in the
code above and the availabilty checker was unconditionally diagnosing set
accessors for `InOutExprs`, resulting in spurious availability warnings for
read-only accesses of properties. The fix is to check whether there is an
enclosing `LoadExpr` in the AST and only diagnose the getter accessor in that
case.
Resolves rdar://124566405
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.