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
@@ -28,7 +28,7 @@ actor class MyActor: MySuperActor {
28
28
classfunc synchronousClass(){}
29
29
staticfunc synchronousStatic(){}
30
30
31
-
func synchronous()->String{ text.first ??"nothing"} // expected-note 6{{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
31
+
func synchronous()->String{ text.first ??"nothing"} // expected-note 8{{only asynchronous methods can be used outside the actor instance; do you want to add 'async'?}}
32
32
func asynchronous()async->String{synchronous()}
33
33
}
34
34
@@ -46,6 +46,7 @@ extension MyActor {
46
46
// @actorIndependent
47
47
_ =actorIndependentFunc(otherActor:self)
48
48
_ = actorIndependentVar
49
+
49
50
actorIndependentVar =17
50
51
_ =self.actorIndependentFunc(otherActor:self)
51
52
_ =self.actorIndependentVar
@@ -60,6 +61,10 @@ extension MyActor {
60
61
_ = immutableGlobal
61
62
_ = mutableGlobal // expected-warning{{reference to var 'mutableGlobal' is not concurrency-safe because it involves shared mutable state}}
62
63
64
+
// Partial application
65
+
_ = synchronous // expected-error{{actor-isolated instance method 'synchronous()' can not be partially applied}}
66
+
_ = super.superMethod // expected-error{{actor-isolated instance method 'superMethod()' can not be partially applied}}
67
+
63
68
return5
64
69
}
65
70
@@ -137,6 +142,10 @@ extension MyActor {
137
142
}
138
143
139
144
localVar =0
145
+
146
+
// Partial application
147
+
_ = synchronous // expected-error{{actor-isolated instance method 'synchronous()' can not be partially applied}}
148
+
_ = super.superMethod // expected-error{{actor-isolated instance method 'superMethod()' can not be partially applied}}
0 commit comments