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
Copy file name to clipboardExpand all lines: test/Sema/coroutine_accessors.swift
+25-25Lines changed: 25 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ var ingnsn_m: Int {
34
34
varignsn_m:Int{
35
35
mutating get{0}
36
36
nonmutating set{}
37
-
nonmutating _modify{ // expected-error{{'modify' accessor cannot be 'nonmutating' when the getter is 'mutating'}}
37
+
nonmutating _modify{ // expected-error{{'_modify' accessor cannot be 'nonmutating' when the getter is 'mutating'}}
38
38
// expected-note@-3{{getter defined here}}
39
39
varfake:Int
40
40
yield &fake
@@ -43,7 +43,7 @@ var ignsn_m: Int {
43
43
varingsn_m:Int{
44
44
get{0}
45
45
set{}
46
-
nonmutating _modify{ // expected-error{{'modify' accessor cannot be 'nonmutating' when the setter is not 'nonmutating'}}
46
+
nonmutating _modify{ // expected-error{{'_modify' accessor cannot be 'nonmutating' when the setter is not 'nonmutating'}}
47
47
// expected-note@-2{{setter defined here}}
48
48
varfake:Int
49
49
yield &fake
@@ -52,7 +52,7 @@ var ingsn_m: Int {
52
52
varigsn_m:Int{
53
53
mutating get{0}
54
54
set{}
55
-
nonmutating _modify{ // expected-error{{'modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the getter is 'mutating'}}
55
+
nonmutating _modify{ // expected-error{{'_modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the getter is 'mutating'}}
56
56
// expected-note@-2{{setter defined here}}
57
57
// expected-note@-4{{getter defined here}}
58
58
varfake:Int
@@ -62,7 +62,7 @@ var igsn_m: Int {
62
62
varingns_m:Int{
63
63
get{0}
64
64
nonmutating set{}
65
-
_modify{ // expected-error{{'modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the getter is not 'mutating'}}
65
+
_modify{ // expected-error{{'_modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the getter is not 'mutating'}}
66
66
// expected-note@-2{{setter defined here}}
67
67
// expected-note@-4{{getter defined here}}
68
68
yield &i
@@ -116,16 +116,16 @@ var in_rnsn_m: Int {
116
116
vari_rnsn_m:Int{
117
117
mutating _read { yield i }
118
118
nonmutating set{}
119
-
nonmutating _modify{ // expected-error{{'modify' accessor cannot be 'nonmutating' when the 'read' accessor is 'mutating'}}
120
-
// expected-note@-3{{'read' accessor defined here}}
119
+
nonmutating _modify{ // expected-error{{'_modify' accessor cannot be 'nonmutating' when the '_read' accessor is 'mutating'}}
120
+
// expected-note@-3{{'_read' accessor defined here}}
121
121
varfake:Int
122
122
yield &fake
123
123
}
124
124
}
125
125
varin_rsn_m:Int{
126
126
_read{ yield i }
127
127
set{}
128
-
nonmutating _modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when the setter is not 'nonmutating'}}
128
+
nonmutating _modify { // expected-error{{'_modify' accessor cannot be 'nonmutating' when the setter is not 'nonmutating'}}
129
129
// expected-note@-2{{setter defined here}}
130
130
varfake:Int
131
131
yield &fake
@@ -134,19 +134,19 @@ var in_rsn_m: Int {
134
134
vari_rsn_m:Int{
135
135
mutating _read { yield i }
136
136
set{}
137
-
nonmutating _modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the 'read' accessor is 'mutating'}}
137
+
nonmutating _modify { // expected-error{{'_modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the '_read' accessor is 'mutating'}}
138
138
// expected-note@-2{{setter defined here}}
139
-
// expected-note@-4{{'read' accessor defined here}}
139
+
// expected-note@-4{{'_read' accessor defined here}}
140
140
varfake:Int
141
141
yield &fake
142
142
}
143
143
}
144
144
varin_rns_m:Int{
145
145
_read{ yield i }
146
146
nonmutating set {}
147
-
_modify{ // expected-error{{'modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the 'read' accessor is not 'mutating'}}
147
+
_modify{ // expected-error{{'_modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the '_read' accessor is not 'mutating'}}
148
148
// expected-note@-2{{setter defined here}}
149
-
// expected-note@-4{{'read' accessor defined here}}
149
+
// expected-note@-4{{'_read' accessor defined here}}
150
150
yield &i
151
151
}
152
152
}
@@ -198,7 +198,7 @@ var inrnsn_m: Int {
198
198
varirnsn_m:Int{
199
199
mutating read { yield i }
200
200
nonmutating set{}
201
-
nonmutating _modify{ // expected-error{{'modify' accessor cannot be 'nonmutating' when the 'read' accessor is 'mutating'}}
201
+
nonmutating _modify{ // expected-error{{'_modify' accessor cannot be 'nonmutating' when the 'read' accessor is 'mutating'}}
202
202
// expected-note@-3{{'read' accessor defined here}}
203
203
varfake:Int
204
204
yield &fake
@@ -207,7 +207,7 @@ var irnsn_m: Int {
207
207
varinrsn_m:Int{
208
208
read{ yield i }
209
209
set{}
210
-
nonmutating _modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when the setter is not 'nonmutating'}}
210
+
nonmutating _modify { // expected-error{{'_modify' accessor cannot be 'nonmutating' when the setter is not 'nonmutating'}}
211
211
// expected-note@-2{{setter defined here}}
212
212
varfake:Int
213
213
yield &fake
@@ -216,7 +216,7 @@ var inrsn_m: Int {
216
216
varirsn_m:Int{
217
217
mutating read { yield i }
218
218
set{}
219
-
nonmutating _modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the 'read' accessor is 'mutating'}}
219
+
nonmutating _modify { // expected-error{{'_modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the 'read' accessor is 'mutating'}}
220
220
// expected-note@-2{{setter defined here}}
221
221
// expected-note@-4{{'read' accessor defined here}}
222
222
varfake:Int
@@ -226,7 +226,7 @@ var irsn_m: Int {
226
226
varinrns_m:Int{
227
227
read{ yield i }
228
228
nonmutating set {}
229
-
_modify{ // expected-error{{'modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the 'read' accessor is not 'mutating'}}
229
+
_modify{ // expected-error{{'_modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the 'read' accessor is not 'mutating'}}
230
230
// expected-note@-2{{setter defined here}}
231
231
// expected-note@-4{{'read' accessor defined here}}
nonmutating _modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the addressor is 'mutating'}}
301
+
nonmutating _modify { // expected-error{{'_modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the addressor is 'mutating'}}
302
302
// expected-note@-2{{setter defined here}}
303
303
// expected-note@-4{{addressor defined here}}
304
304
varfake:Int
@@ -308,7 +308,7 @@ var iuasn_m: Int {
308
308
varinuans_m:Int{
309
309
unsafeAddress{UnsafePointer(bitPattern:0x0)! }
310
310
nonmutating set {}
311
-
_modify{ // expected-error{{'modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the addressor is not 'mutating'}}
311
+
_modify{ // expected-error{{'_modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the addressor is not 'mutating'}}
312
312
// expected-note@-2{{setter defined here}}
313
313
// expected-note@-4{{addressor defined here}}
314
314
yield &i
@@ -444,8 +444,8 @@ var in_rnsnm: Int {
444
444
vari_rnsnm:Int{
445
445
mutating _read { yield i }
446
446
nonmutating set{}
447
-
nonmutating modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when the 'read' accessor is 'mutating'}}
448
-
// expected-note@-3{{'read' accessor defined here}}
447
+
nonmutating modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when the '_read' accessor is 'mutating'}}
448
+
// expected-note@-3{{'_read' accessor defined here}}
449
449
varfake:Int
450
450
yield &fake
451
451
}
@@ -462,19 +462,19 @@ var in_rsnm: Int {
462
462
vari_rsnm:Int{
463
463
mutating _read { yield i }
464
464
set{}
465
-
nonmutating modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the 'read' accessor is 'mutating'}}
465
+
nonmutating modify { // expected-error{{'modify' accessor cannot be 'nonmutating' when either the setter is not 'nonmutating' or the '_read' accessor is 'mutating'}}
466
466
// expected-note@-2{{setter defined here}}
467
-
// expected-note@-4{{'read' accessor defined here}}
467
+
// expected-note@-4{{'_read' accessor defined here}}
468
468
varfake:Int
469
469
yield &fake
470
470
}
471
471
}
472
472
varin_rnsm:Int{
473
473
_read{ yield i }
474
474
nonmutating set {}
475
-
modify{ // expected-error{{'modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the 'read' accessor is not 'mutating'}}
475
+
modify{ // expected-error{{'modify' accessor cannot be 'mutating' when both the setter is 'nonmutating' and the '_read' accessor is not 'mutating'}}
476
476
// expected-note@-2{{setter defined here}}
477
-
// expected-note@-4{{'read' accessor defined here}}
477
+
// expected-note@-4{{'_read' accessor defined here}}
0 commit comments