Commit Graph

12 Commits

Author SHA1 Message Date
Allan Shortlidge
c13dd18ef8 Sema: Diagnose the availability of global actor attributes. This includes SPI and resilience diagnostics. 2022-08-20 17:57:25 -07:00
Doug Gregor
717da76ec2 [SE-0338] Perform Sendable checking when exiting an actor via conformance.
When a requirement is actor-isolated and asynchronous but its witness is
non-isolated, perform Sendable checking on the requirement's type.
2022-05-25 15:17:47 -07:00
Doug Gregor
a8e16297a9 Sendable checking for overrides.
When an override means crossing an actor boundary, check Sendability of
parameters and results.
2022-05-25 15:17:47 -07:00
Slava Pestov
9170378d25 RequirementMachine: Fix handling of Sendable conformances for superclass requirements
Don't set allowMissing to true when checking conformance of a superclass requirement
to a protocol, since this prevents us from being able to express something like
'T : C, T : Sendable' to mean 'T can be any subclass of C which is also Sendable'.

Fixes rdar://problem/91530343.
2022-04-11 14:52:32 -04:00
Doug Gregor
f3fd64a71b Support missing Sendable conformances everywhere in the requirement machine 2022-04-08 16:10:38 -07:00
Doug Gregor
45c7d6f4b8 Allow missing Sendable conformances when type parametesr are made concrete.
Fixes rdar://91174106.
2022-04-08 15:42:33 -07:00
Becca Royal-Gordon
79a7f39631 Permit redeclaration of superclass's Sendable-ness
A recent change to `Sendable` conformance handling resulted in subclasses of global-actor-confined classes being rejected if they explicitly declared a conformance to `Sendable`.

This behavior is technically correct because actor-isolated types are implicitly `Sendable`, but the source compatibility regression was not desirable. We are also considering requiring subclasses to explicitly repeat their superclass's `Sendable` conformance, so it makes sense to allow these redundant conformances in the general case to ease that potential transition.

Fixes rdar://88700507.
2022-02-09 16:02:27 -08:00
Doug Gregor
cd5145921e Ensure that we warn about non-local non-@unchecked Sendable conformances. 2022-01-30 23:55:39 -08:00
Doug Gregor
5023a934fc Tolerate missing Sendable conformances on superclasses.
Fixes the crash in rdar://86653457
2022-01-11 11:11:21 -08:00
Doug Gregor
88e32e42cb Improve sendable diagnostics for property accesses 2021-12-16 16:50:11 -08:00
Doug Gregor
11601c477d Improve Sendable diagnostics for result types of functions. 2021-12-16 15:43:25 -08:00
Doug Gregor
bcfd27edd9 Sendable checking for an an isolated witnesses to a nonisolated requirement
When a non-isolated requirement is witnessed by an actor-isolated
witness, we are crossing into the actor. Ensure that we perform
Sendable checking across the actor boundary here.

Fixes the rest of rdar://80424675.
2021-12-14 16:56:15 -08:00