@@ -36,24 +36,24 @@ extension TestActor {
36
36
37
37
// Can't pass actor-isolated primitive into a function
38
38
func inoutAsyncFunctionCall( ) async {
39
- // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to asynchronous function}}
39
+ // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call }}
40
40
await modifyAsynchronously ( & value1)
41
41
}
42
42
43
43
func inoutAsyncClosureCall( ) async {
44
- // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to asynchronous function}}
44
+ // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call }}
45
45
await { ( _ foo: inout Int ) async in foo += 1 } ( & value1)
46
46
}
47
47
48
48
// Can't pass actor-isolated primitive into first-class function value
49
49
func inoutAsyncValueCall( ) async {
50
- // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to asynchronous function}}
50
+ // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call }}
51
51
await modifyAsyncValue ( & value1)
52
52
}
53
53
54
54
// Can't pass property of actor-isolated state inout to async function
55
55
func inoutPropertyStateValueCall( ) async {
56
- // expected-error@+1{{actor-isolated property 'position' cannot be passed 'inout' to asynchronous function}}
56
+ // expected-error@+1{{actor-isolated property 'position' cannot be passed 'inout' to 'async' function call }}
57
57
await modifyAsynchronously ( & position. x)
58
58
}
59
59
}
@@ -65,7 +65,7 @@ extension TestActor {
65
65
}
66
66
67
67
func passStateIntoMethod( ) async {
68
- // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to asynchronous function}}
68
+ // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call }}
69
69
await modifyByValue ( & value1)
70
70
}
71
71
}
@@ -88,23 +88,23 @@ extension TestActor {
88
88
func passStateIntoDifferentClassMethod( ) async {
89
89
let other = NonAsyncClass ( )
90
90
let otherCurry = other. modifyOtherAsync
91
- // expected-error@+1{{actor-isolated property 'value2' cannot be passed 'inout' to asynchronous function}}
91
+ // expected-error@+1{{actor-isolated property 'value2' cannot be passed 'inout' to 'async' function call }}
92
92
await other. modifyOtherAsync ( & value2)
93
- // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to asynchronous function}}
93
+ // expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call }}
94
94
await otherCurry ( & value1)
95
95
other. modifyOtherNotAsync ( & value2) // This is okay since it's not async!
96
96
97
97
}
98
98
99
99
func callMutatingFunctionOnStruct( ) async {
100
100
// expected-error@+3:20{{cannot call mutating async function 'setComponents(x:y:)' on actor-isolated property 'position'}}
101
- // expected-error@+2:51{{actor-isolated property 'nextPosition' cannot be passed 'inout' to asynchronous function}}
102
- // expected-error@+1:71{{actor-isolated property 'nextPosition' cannot be passed 'inout' to asynchronous function}}
101
+ // expected-error@+2:51{{actor-isolated property 'nextPosition' cannot be passed 'inout' to 'async' function call }}
102
+ // expected-error@+1:71{{actor-isolated property 'nextPosition' cannot be passed 'inout' to 'async' function call }}
103
103
await position. setComponents ( x: & nextPosition. x, y: & nextPosition. y)
104
104
105
105
// expected-error@+3:20{{cannot call mutating async function 'setComponents(x:y:)' on actor-isolated property 'position'}}
106
- // expected-error@+2:38{{actor-isolated property 'value1' cannot be passed 'inout' to asynchronous function}}
107
- // expected-error@+1:50{{actor-isolated property 'value2' cannot be passed 'inout' to asynchronous function}}
106
+ // expected-error@+2:38{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call }}
107
+ // expected-error@+1:50{{actor-isolated property 'value2' cannot be passed 'inout' to 'async' function call }}
108
108
await position. setComponents ( x: & value1, y: & value2)
109
109
}
110
110
}
@@ -120,14 +120,14 @@ extension TestActor {
120
120
// Actor state passed inout to implicitly async function on an actor of the
121
121
// same type
122
122
func modifiedByOtherTestActor( _ other: TestActor ) async {
123
- //expected-error@+1{{actor-isolated property 'value2' cannot be passed 'inout' to asynchronous function}}
123
+ //expected-error@+1{{actor-isolated property 'value2' cannot be passed 'inout' to implicitly 'async' function call }}
124
124
await other. modify ( & value2)
125
125
}
126
126
127
127
// Actor state passed inout to an implicitly async function on an actor of a
128
128
// different type
129
129
func modifiedByOther( _ other: DifferentActor ) async {
130
- //expected-error@+1{{actor-isolated property 'value2' cannot be passed 'inout' to asynchronous function}}
130
+ //expected-error@+1{{actor-isolated property 'value2' cannot be passed 'inout' to implicitly 'async' function call }}
131
131
await other. modify ( & value2)
132
132
}
133
133
}
0 commit comments