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
// expected-error@+1 {{call to global actor 'SomeGlobalActor'-isolated global function 'requiresSomeGlobalActor()' in a synchronous nonisolated context}}
80
+
// expected-error@+1 {{default argument cannot be both main actor-isolated and global actor 'SomeGlobalActor'-isolated}}
// expected-error@+1 {{default argument cannot be both main actor-isolated and global actor 'SomeGlobalActor'-isolated}}
103
104
closure:()->Void={
104
105
_ =requiresMainActor()
105
-
// expected-error@+1 {{call to global actor 'SomeGlobalActor'-isolated global function 'requiresSomeGlobalActor()' in a synchronous nonisolated context}}
106
106
_ =requiresSomeGlobalActor()
107
107
}
108
108
){}
109
+
110
+
func isolationInLocalFunction(
111
+
closure:()->Void={
112
+
nonisolated func local()-> Int {
113
+
// expected-error@+1 {{call to main actor-isolated global function 'requiresMainActor()' in a synchronous nonisolated context}}
114
+
requiresMainActor()
115
+
}
116
+
}
117
+
){}
118
+
119
+
actorA{}
120
+
121
+
func closureWithIsolatedParam(
122
+
closure:(isolated A)->Void={ _ in
123
+
// expected-error@+1 {{call to main actor-isolated global function 'requiresMainActor()' in a synchronous actor-isolated context}}
0 commit comments