mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Introduce checking for ConcurrentValue conformance across actors.
When referring to an actor-isolated declaration from outside of the actor, ensure that the types involved conform to the `ConcurrentValue` protocol. Otherwise, produce a diagnostic stating that it is unsafe to pass such types across actors. Apply the same rule to local captures within concurrent code.
This commit is contained in:
@@ -385,6 +385,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.EnableExperimentalConcurrency |=
|
||||
Args.hasArg(OPT_enable_experimental_concurrency);
|
||||
Opts.EnableExperimentalConcurrentValueChecking |=
|
||||
Args.hasArg(OPT_enable_experimental_concurrent_value_checking);
|
||||
|
||||
Opts.DisableImplicitConcurrencyModuleImport |=
|
||||
Args.hasArg(OPT_disable_implicit_concurrency_module_import);
|
||||
|
||||
Reference in New Issue
Block a user