Skip to content

Commit a4f4e0f

Browse files
author
Greg Titus
committed
Relative line numbers so there aren't diffs here everytime lines above change.
1 parent 0350023 commit a4f4e0f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/Constraints/diagnostics.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,19 +1552,19 @@ func testNilCoalescingOperatorRemoveFix() {
15521552
let _ = "" /* This is a comment */ ?? "" // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{13-43=}}
15531553

15541554
let _ = "" // This is a comment
1555-
?? "" // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{1554:13-1555:10=}}
1555+
?? "" // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{-1:13-+0:10=}}
15561556

15571557
let _ = "" // This is a comment
15581558
/*
15591559
* The blank line below is part of the test case, do not delete it
15601560
*/
1561-
?? "" // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{1557:13-1561:10=}}
1561+
?? "" // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{-4:13-+0:10=}}
15621562

1563-
if ("" ?? // This is a comment // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{9-1564:9=}}
1563+
if ("" ?? // This is a comment // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{9-+1:9=}}
15641564
"").isEmpty {}
15651565

15661566
if ("" // This is a comment
1567-
?? "").isEmpty {} // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{1566:9-1567:12=}}
1567+
?? "").isEmpty {} // expected-warning {{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}} {{-1:9-+0:12=}}
15681568
}
15691569

15701570
// https://github.com/apple/swift/issues/74617

0 commit comments

Comments
 (0)