Skip to content

Commit 93c964f

Browse files
committed
Gardening: Migrate test suite to GH issues: decl/subscript
1 parent 6a91ae3 commit 93c964f

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

test/decl/subscript/subscripting.swift

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ func testSubscript1(_ s2 : SubscriptTest2) {
424424
let v: (Int?, [Int]?) = (nil [17]) // expected-error {{cannot subscript a nil literal value}}
425425
}
426426

427-
// sr-114 & rdar://22007370
427+
// rdar://22007370
428+
// https://github.com/apple/swift/issues/42736
428429

429430
class Foo {
430431
subscript(key: String) -> String { // expected-note {{'subscript(_:)' previously declared here}}
@@ -447,17 +448,19 @@ protocol r23952125 {
447448
var c : Int // expected-error {{property in protocol must have explicit { get } or { get set } specifier}} {{14-14= { get <#set#> \}}}
448449
}
449450

450-
// SR-2575
451-
struct SR2575 {
452-
subscript() -> Int { // expected-note {{declared here}}
453-
return 1
451+
// https://github.com/apple/swift/issues/45180
452+
do {
453+
struct S {
454+
subscript() -> Int { // expected-note {{declared here}}
455+
return 1
456+
}
454457
}
455-
}
456458

457-
SR2575().subscript()
458-
// expected-error@-1 {{value of type 'SR2575' has no property or method named 'subscript'; did you mean to use the subscript operator?}} {{9-10=}} {{10-19=}} {{19-20=[}} {{20-21=]}}
459+
S().subscript()
460+
// expected-error@-1 {{value of type 'S' has no property or method named 'subscript'; did you mean to use the subscript operator?}} {{6-7=}} {{7-16=}} {{16-17=[}} {{17-18=]}}
461+
}
459462

460-
// SR-7890
463+
// https://github.com/apple/swift/issues/50425
461464

462465
struct InOutSubscripts {
463466
subscript(x1: inout Int) -> Int { return 0 }

0 commit comments

Comments
 (0)