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
@BananaActorfunc wisk(_ something :Any){} // expected-note 4 {{only asynchronous methods can be used outside the actor instance}}
155
+
@BananaActorfunc wisk(_ something :Any){} // expected-note 4 {{calls to global function 'wisk' from outside of its actor context are implicitly asynchronous}}
154
156
155
-
@BananaActorfunc peelBanana(){} // expected-note 2 {{only asynchronous methods can be used outside the actor instance}}
157
+
@BananaActorfunc peelBanana(){} // expected-note 2 {{calls to global function 'peelBanana()' from outside of its actor context are implicitly asynchronous}}
@@ -34,7 +34,7 @@ actor class MyActor: MySuperActor {
34
34
classfunc synchronousClass(){}
35
35
staticfunc synchronousStatic(){}
36
36
37
-
func synchronous()->String{ text.first ??"nothing"} // expected-note 20{{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
37
+
func synchronous()->String{ text.first ??"nothing"} // expected-note 20{{calls to instance method 'synchronous()' from outside of its actor context are implicitly asynchronous}}
@SomeGlobalActorfunc syncGlobalActorFunc(){syncGlobalActorFunc()} // expected-note{{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
202
+
@SomeGlobalActorfunc syncGlobalActorFunc(){syncGlobalActorFunc()} // expected-note{{calls to global function 'syncGlobalActorFunc()' from outside of its actor context are implicitly asynchronous}}
func method1(){} // expected-note {{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
63
+
func method1(){} // expected-note {{calls to instance method 'method1()' from outside of its actor context are implicitly asynchronous}}
64
64
}
65
65
66
66
extensionC3{
67
-
func method2(){} // expected-note {{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
67
+
func method2(){} // expected-note {{calls to instance method 'method2()' from outside of its actor context are implicitly asynchronous}}
68
68
}
69
69
70
70
classC4:C3{
71
-
func method3(){} // expected-note {{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
71
+
func method3(){} // expected-note {{calls to instance method 'method3()' from outside of its actor context are implicitly asynchronous}}
72
72
}
73
73
74
74
extensionC4{
75
-
func method4(){} // expected-note {{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
75
+
func method4(){} // expected-note {{calls to instance method 'method4()' from outside of its actor context are implicitly asynchronous}}
76
76
}
77
77
78
78
classC5{
79
79
func method1(){}
80
80
}
81
81
82
82
@SomeGlobalActorextensionC5{
83
-
func method2(){} // expected-note {{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
83
+
func method2(){} // expected-note {{calls to instance method 'method2()' from outside of its actor context are implicitly asynchronous}}
84
84
}
85
85
86
86
// expected-note@+2 5 {{add '@asyncHandler' to function 'testGlobalActorInference(c3:c4:c5:)' to create an implicit asynchronous context}}
@@ -140,7 +140,7 @@ actor class GenericSuper<T> {
140
140
}
141
141
142
142
actorclass GenericSub<T>:GenericSuper<[T]>{
143
-
overridefunc method(){} // expected-note{{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
143
+
overridefunc method(){} // expected-note{{calls to instance method 'method()' from outside of its actor context are implicitly asynchronous}}
144
144
145
145
@GenericGlobalActor<T>overridefunc method2(){} // expected-error{{global actor 'GenericGlobalActor<T>'-isolated instance method 'method2()' has different actor isolation from global actor 'GenericGlobalActor<[T]>'-isolated overridden declaration}}
146
146
@actorIndependentoverridefunc method3(){} // expected-error{{actor-independent instance method 'method3()' has different actor isolation from global actor 'GenericGlobalActor<[T]>'-isolated overridden declaration}}
@@ -168,7 +168,7 @@ struct OtherContainer<U> {
168
168
169
169
// Ensure that substitutions work properly when inheriting.
170
170
classSubclass3<V>:Container<(U,V)>.Superclass2{
171
-
func method(){} // expected-note{{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
171
+
func method(){} // expected-note{{calls to instance method 'method()' from outside of its actor context are implicitly asynchronous}}
0 commit comments