Merge pull request #34688 from etcwilde/ewilde/disallow-passing-actor-state-inout

[Concurrency] Ban passing actor state via inout

Resolves: rdar://70635479
This commit is contained in:
Evan
2020-12-15 10:59:42 -08:00
committed by GitHub
3 changed files with 231 additions and 2 deletions

View File

@@ -4210,6 +4210,13 @@ ERROR(actor_isolated_self_independent_context,none,
"actor-isolated %0 %1 can not be referenced from an "
"'@actorIndependent' context",
(DescriptiveDeclKind, DeclName))
ERROR(actor_isolated_inout_state,none,
"actor-isolated %0 %1 cannot be passed 'inout' to"
"%select{| implicitly}2 'async' function call",
(DescriptiveDeclKind, DeclName, bool))
ERROR(actor_isolated_mutating_func,none,
"cannot call mutating async function %0 on actor-isolated %1 %2",
(DeclName, DescriptiveDeclKind, DeclName))
ERROR(actor_isolated_global_actor_context,none,
"actor-isolated %0 %1 can not be referenced from context of global "
"actor %2",