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-warning@+1 {{'(unsafe)' global actors are deprecated; use '@preconcurrency' instead}}
16
16
@SomeGlobalActor(unsafe)func globalSome(){} // expected-note 2{{calls to global function 'globalSome()' from outside of its actor context are implicitly asynchronous}}
17
-
// expected-complete-tns-note @-1 {{calls to global function 'globalSome()' from outside of its actor context are implicitly asynchronous}}
17
+
// expected-complete-note @-1 {{calls to global function 'globalSome()' from outside of its actor context are implicitly asynchronous}}
// expected-complete-tns-note @-1 2{{add '@MainActor' to make global function 'testP2_noconcurrency(x:p2:)' part of global actor 'MainActor'}}
79
+
// expected-complete-note @-1 2{{add '@MainActor' to make global function 'testP2_noconcurrency(x:p2:)' part of global actor 'MainActor'}}
80
80
p2.f() // okay without complete. with targeted/minimal not concurrency-related code.
81
-
// expected-complete-tns-warning @-1 {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
81
+
// expected-complete-warning @-1 {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
82
82
p2.g() // okay
83
83
x.f() // okay without complete. with targeted/minimal not concurrency-related code
84
-
// expected-complete-tns-warning @-1 {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
84
+
// expected-complete-warning @-1 {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
85
85
x.g() // OKAY
86
86
}
87
87
@@ -96,7 +96,7 @@ class C1 {
96
96
classC2:C1{
97
97
overridefunc method(){ // expected-note 2{{overridden declaration is here}}
98
98
globalSome() // okay when not in complete
99
-
// expected-complete-tns-warning @-1 {{call to global actor 'SomeGlobalActor'-isolated global function 'globalSome()' in a synchronous main actor-isolated context}}
99
+
// expected-complete-warning @-1 {{call to global actor 'SomeGlobalActor'-isolated global function 'globalSome()' in a synchronous main actor-isolated context}}
// expected-warning@+2 {{'(unsafe)' global actors are deprecated; use '@preconcurrency' instead}}
118
-
// expected-complete-and-tns-note@+1 {{calls to initializer 'init(mainActorUnsafe:)' from outside of its actor context are implicitly asynchronous}}
118
+
// expected-complete-note@+1 {{calls to initializer 'init(mainActorUnsafe:)' from outside of its actor context are implicitly asynchronous}}
119
119
@MainActor(unsafe)init(mainActorUnsafe:Int){}
120
120
}
121
121
122
-
// expected-complete-and-tns-note @+3 {{add '@MainActor' to make global function 'globActorTest1()' part of global actor 'MainActor'}}
122
+
// expected-complete-note @+3 {{add '@MainActor' to make global function 'globActorTest1()' part of global actor 'MainActor'}}
123
123
// expected-note @+2 {{add '@MainActor' to make global function 'globActorTest1()' part of global actor 'MainActor'}}
124
124
// expected-note @+1 2 {{add 'async' to function 'globActorTest1()' to make it asynchronous}}
125
125
func globActorTest1(){
@@ -129,7 +129,7 @@ func globActorTest1() {
129
129
130
130
_ =SomeStruct(asyncMainActorUnsafe:0) // expected-error {{'async' call in a function that does not support concurrency}}
131
131
132
-
_ =SomeStruct(mainActorUnsafe:0) // expected-complete-and-tns-warning {{call to main actor-isolated initializer 'init(mainActorUnsafe:)' in a synchronous nonisolated context}}
132
+
_ =SomeStruct(mainActorUnsafe:0) // expected-complete-warning {{call to main actor-isolated initializer 'init(mainActorUnsafe:)' in a synchronous nonisolated context}}
0 commit comments