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
This patch forces the main function to be protected behind MainActor
isolation. If no actor isolation is specified, the main function will
implicitly have MainActor isolation.
staticfunc main(){ // expected-error{{main() must be '@MainActor'}}
14
+
// expected-error@+1{{var 'poof' isolated to global actor 'Kat' can not be referenced from different global actor 'MainActor' in a synchronous context}}
15
+
print("Kat value: \(poof)")
16
+
}
17
+
}
18
+
19
+
structBunny{
20
+
// Bunnies are not @main, so they can have a "main" function that is on
21
+
// another actor. It's not actually the main function, so it's fine.
0 commit comments