You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[concurrency] patch hole in typechecking ordinary functions for global actor references
Non-actor isolated synchronous functions were previously
allowed to call & reference global-actor isolated declarations.
This patch puts a stop to that.
Resolves rdar://71548470
// expected-note@+1 13 {{calls to global function 'syncGlobActorFn()' from outside of its actor context are implicitly asynchronous}}
14
+
@SomeGlobalActorfunc syncGlobActorFn(){}
15
+
@SomeGlobalActorfunc asyncGlobalActFn()async{}
16
+
17
+
actorclass Alex {
18
+
@SomeGlobalActorletconst_memb=20
19
+
@SomeGlobalActorvarmut_memb=30 // expected-note 2 {{mutable state is only available within the actor instance}}
20
+
@SomeGlobalActorfunc method(){} // expected-note 2 {{calls to instance method 'method()' from outside of its actor context are implicitly asynchronous}}
0 commit comments