Commit Graph

8 Commits

Author SHA1 Message Date
Doug Gregor
30bfe4dcc0 Update diagnostics to talk about non-isolated rather than @actorIndependent 2021-03-07 22:16:34 -08:00
Kavon Farvardin
74eb1a7ae6 allow property/subscript access expressions for actors in typechecker
We now mark some DeclRefExpr and LookupExprs as implicitly async
during typechecking, depending on whether they appear in a context
that is only performing a read / get operation, and whether they
are cross-actor operations.

also resolves rdar://72403401 by improving the error messages
(no more vague "'await' in async context" when its clearly a call!)
2021-03-04 18:37:32 -08:00
Evan Wilde
8b80331c3d Updating tests to use actor
This patch updates the `actor class` spelling to `actor` in almost all
of the tests. There are places where I verify that we sanely handle
`actor` as an attribute though. These include:

 - test/decl/class/actor/basic.swift
 - test/decl/protocol/special/Actor.swift
 - test/SourceKit/CursorInfo/cursor_info_concurrency.swift
 - test/attr/attr_objc_async.swift
 - test/ModuleInterface/actor_protocol.swift
2021-02-10 08:09:13 -08:00
Doug Gregor
af8d931486 [Concurrency] Loosen constraints on @actorIndependent placement.
@actorIndependent is needed on declarations outside of actors to
(e.g.) disable inference of a global actor. It is also effectively the
default, so allow it to be specified explicitly.
2021-01-05 22:01:10 -08:00
John McCall
a8464dcaf1 Implicitly import _Concurrency under -enable-experimental-concurrency 2020-10-22 00:53:15 -04:00
Kavon Farvardin
0752121cc5 add regression tests for SR-13735 2020-10-19 15:20:55 -07:00
Kavon Farvardin
849e9d660f fix diagnostic messages that said '@actorIsolated' for @actorIndependent 2020-10-19 15:20:00 -07:00
Doug Gregor
2762405390 [Concurrency] Introduce @actorIndependent attribute.
Introduce a new attribute `@actorIndependent` that specifies that a
given declaration is considered to be independent of any actor.
Actor-independent declarations do not have access to actor-isolated
state, even when they are declared as instance members of the actor.

On the other hand, actor-independent declarations can be used to
conform to (synchronous) requirements in protocols.
2020-09-18 22:56:17 -07:00