File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -202,21 +202,21 @@ func inoutSeparateTupleElements() {
202
202
203
203
func inoutSameTupleElement( ) {
204
204
var t = ( 1 , 4 )
205
- takesTwoInouts ( & t. 0 , & t. 0 ) // no-error
205
+ takesTwoInouts ( & t. 0 , & t. 0 )
206
206
// expected-error@-1{{overlapping accesses to 't.0', but modification requires exclusive access; consider copying to a local variable}}
207
207
// expected-note@-2{{conflicting access is here}}
208
208
}
209
209
210
210
func inoutSameTupleNamedElement( ) {
211
211
var t = ( name1: 1 , name2: 4 )
212
- takesTwoInouts ( & t. name2, & t. name2) // no-error
212
+ takesTwoInouts ( & t. name2, & t. name2)
213
213
// expected-error@-1{{overlapping accesses to 't.name2', but modification requires exclusive access; consider copying to a local variable}}
214
214
// expected-note@-2{{conflicting access is here}}
215
215
}
216
216
217
217
func inoutSamePropertyInSameTuple( ) {
218
218
var t = ( name1: 1 , name2: StructWithTwoStoredProp ( ) )
219
- takesTwoInouts ( & t. name2. f1, & t. name2. f1) // no-error
219
+ takesTwoInouts ( & t. name2. f1, & t. name2. f1)
220
220
// expected-error@-1{{overlapping accesses to 't.name2.f1', but modification requires exclusive access; consider copying to a local variable}}
221
221
// expected-note@-2{{conflicting access is here}}
222
222
}
You can’t perform that action at this time.
0 commit comments