@@ -4153,6 +4153,21 @@ ERROR(actor_isolated_self_independent_context,none,
4153
4153
" actor-isolated %0 %1 can not be referenced from an "
4154
4154
" '@actorIndependent' context" ,
4155
4155
(DescriptiveDeclKind, DeclName))
4156
+ ERROR(actor_isolated_global_actor_context,none,
4157
+ " actor-isolated %0 %1 can not be referenced from context of global "
4158
+ " actor %2" ,
4159
+ (DescriptiveDeclKind, DeclName, Type))
4160
+ ERROR(global_actor_from_instance_actor_context,none,
4161
+ " %0 %1 isolated to global actor %2 can not be referenced from actor %3" ,
4162
+ (DescriptiveDeclKind, DeclName, Type, DeclName))
4163
+ ERROR(global_actor_from_other_global_actor_context,none,
4164
+ " %0 %1 isolated to global actor %2 can not be referenced from "
4165
+ " different global actor %3" ,
4166
+ (DescriptiveDeclKind, DeclName, Type, Type))
4167
+ ERROR(global_actor_from_independent_context,none,
4168
+ " %0 %1 isolated to global actor %2 can not be referenced from an "
4169
+ " '@actorIndependent' context" ,
4170
+ (DescriptiveDeclKind, DeclName, Type))
4156
4171
ERROR(actor_isolated_partial_apply,none,
4157
4172
" actor-isolated %0 %1 can not be partially applied" ,
4158
4173
(DescriptiveDeclKind, DeclName))
@@ -4205,6 +4220,36 @@ ERROR(enqueue_partial_task_not_in_context,none,
4205
4220
" 'enqueue(partialTask:)' can only be implemented in the definition of "
4206
4221
" actor class %0" , (Type))
4207
4222
4223
+ ERROR(global_actor_missing_shared,none,
4224
+ " global actor %0 requires a static property 'shared' that produces an "
4225
+ " actor instance" , (Identifier))
4226
+ NOTE(global_actor_shared_not_static,none,
4227
+ " 'shared' property in global actor is not 'static'" , ())
4228
+ NOTE(global_actor_shared_inaccessible,none,
4229
+ " 'shared' property has more restrictive access (%0) than its global actor "
4230
+ " (%1)" ,
4231
+ (StringRef, StringRef))
4232
+ NOTE(global_actor_shared_constrained_extension,none,
4233
+ " 'shared' property in global actor cannot be in a constrained extension" ,
4234
+ ())
4235
+ NOTE(global_actor_shared_non_actor_type,none,
4236
+ " 'shared' property type %0 does not conform to the 'Actor' protocol" ,
4237
+ (Type))
4238
+
4239
+ ERROR(multiple_global_actors,none,
4240
+ " declaration can not have multiple global actor attributes (%0 and %1)" ,
4241
+ (Identifier, Identifier))
4242
+ ERROR(global_actor_disallowed,none,
4243
+ " %0 cannot have a global actor" , (DescriptiveDeclKind))
4244
+ ERROR(global_actor_on_actor_class,none,
4245
+ " actor class %0 cannot have a global actor" , (Identifier))
4246
+ ERROR(global_actor_on_local_variable,none,
4247
+ " local variable %0 cannot have a global actor" , (DeclName))
4248
+
4249
+ ERROR(actor_isolation_multiple_attr,none,
4250
+ " %0 %1 has multiple actor-isolation attributes ('%2' and '%3')" ,
4251
+ (DescriptiveDeclKind, DeclName, StringRef, StringRef))
4252
+
4208
4253
// ------------------------------------------------------------------------------
4209
4254
// MARK: Type Check Types
4210
4255
// ------------------------------------------------------------------------------
0 commit comments