Skip to content

[Exclusivity] Remove erroneous no-error comments from tests. NFC. #10273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/SILOptimizer/exclusivity_static_diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,21 @@ func inoutSeparateTupleElements() {

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

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

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