Skip to content

Commit 4d65801

Browse files
authored
Merge pull request #10273 from devincoughlin/erroneous-no-error
2 parents 98411c8 + 1a3115c commit 4d65801

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/SILOptimizer/exclusivity_static_diagnostics.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,21 @@ func inoutSeparateTupleElements() {
202202

203203
func inoutSameTupleElement() {
204204
var t = (1, 4)
205-
takesTwoInouts(&t.0, &t.0) // no-error
205+
takesTwoInouts(&t.0, &t.0)
206206
// expected-error@-1{{overlapping accesses to 't.0', but modification requires exclusive access; consider copying to a local variable}}
207207
// expected-note@-2{{conflicting access is here}}
208208
}
209209

210210
func inoutSameTupleNamedElement() {
211211
var t = (name1: 1, name2: 4)
212-
takesTwoInouts(&t.name2, &t.name2) // no-error
212+
takesTwoInouts(&t.name2, &t.name2)
213213
// expected-error@-1{{overlapping accesses to 't.name2', but modification requires exclusive access; consider copying to a local variable}}
214214
// expected-note@-2{{conflicting access is here}}
215215
}
216216

217217
func inoutSamePropertyInSameTuple() {
218218
var t = (name1: 1, name2: StructWithTwoStoredProp())
219-
takesTwoInouts(&t.name2.f1, &t.name2.f1) // no-error
219+
takesTwoInouts(&t.name2.f1, &t.name2.f1)
220220
// expected-error@-1{{overlapping accesses to 't.name2.f1', but modification requires exclusive access; consider copying to a local variable}}
221221
// expected-note@-2{{conflicting access is here}}
222222
}

0 commit comments

Comments
 (0)