Skip to content

Commit b65e1bb

Browse files
Merge pull request #60840 from AnthonyLatsis/migrate-test-suite-to-gh-issues-14
Gardening: Migrate test suite to GH issues p. 14
2 parents 08b6802 + bc4a346 commit b65e1bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+125
-44
lines changed

test/Frontend/dsohandle-linkable.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// RUN: %target-run-simple-swift
22
// REQUIRES: executable_test
33

4-
// (SR-15938) Error when referencing #dsohandle in a Swift test on Windows
4+
// https://github.com/apple/swift/issues/58199
5+
// Error when referencing #dsohandle in a Swift test on Windows
6+
//
57
// This file tests that #dsohandle is fully usable from the built test. The
68
// precise value of #dsohandle is uninteresting.
79

test/Generics/associated_types.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ struct V<T> : Fooable {
152152
var w = W.AssocType()
153153
var v = V<String>.AssocType()
154154

155-
//
156-
// SR-427
155+
156+
// https://github.com/apple/swift/issues/43044
157+
157158
protocol A {
158159
func c()
159160
}
@@ -176,8 +177,8 @@ struct CC : B {
176177

177178
C<CC>().c()
178179

179-
// SR-511
180-
protocol sr511 {
180+
// https://github.com/apple/swift/issues/43128
181+
protocol P_43128 {
181182
typealias Foo // expected-error {{type alias is missing an assigned type; use 'associatedtype' to define an associated type requirement}}
182183
}
183184

@@ -200,27 +201,28 @@ extension M {
200201
}
201202
}
202203

203-
// SR-6097
204-
protocol sr6097 {
204+
// https://github.com/apple/swift/issues/48652
205+
206+
protocol P11a {
205207
associatedtype A : AnyObject
206208
var aProperty: A { get }
207209
}
208210

209211
class C1 {}
210-
class C2 : sr6097 {
212+
class C2 : P11a {
211213
unowned let aProperty: C1 // should deduce A == C1 despite 'unowned'
212214
init() { fatalError() }
213215
}
214216

215-
protocol sr6097_b {
217+
protocol P11b {
216218
associatedtype A : AnyObject
217219
var aProperty: A? { get }
218220
}
219-
class C3 : sr6097_b {
221+
class C3 : P11b {
220222
weak var aProperty: C1? // and same here, despite 'weak'
221223
init() { fatalError() }
222224
}
223-
class G<T> : sr6097_b where T : AnyObject {
225+
class G<T> : P11b where T : AnyObject {
224226
weak var aProperty: T?
225227
}
226228

test/Generics/associated_types_inherit.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ func callTestP(_ x1: X1) {
3131
testP(x1)
3232
}
3333

34-
// SR-10251: unable to infer associated type in child protocol
34+
// https://github.com/apple/swift/issues/52651
35+
// Unable to infer associated type in child protocol
36+
// FIXME: We already have a test case for this in test/decl/protocol/req/associated_type_inference_fixed_type.swift
37+
3538
protocol P2 { associatedtype T }
3639

3740
protocol P3: P2 where T == Self {}

test/Generics/class_constraint.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ struct Z<U> {
2525
let bad3: X<U> // expected-error{{'X' requires that 'U' be a class type}}
2626
}
2727

28-
// SR-7168: layout constraints weren't getting merged.
28+
// https://github.com/apple/swift/issues/49716
29+
// Layout constraints weren't getting merged.
30+
2931
protocol P1 {
3032
associatedtype A
3133
var a: A { get }

test/Generics/conditional_conformances.swift

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,15 @@ func passesConditionallyNotF7(x21: X2<X1>) {
378378
takesF7(x21) // expected-error{{global function 'takesF7' requires that 'X1.A' (aka 'X0') conform to 'P7'}}
379379
}
380380

381-
382-
public struct SR6990<T, U> {}
383-
extension SR6990: Sequence where T == Int {
381+
// https://github.com/apple/swift/issues/49538
382+
public struct S_49538<T, U> {}
383+
extension S_49538: Sequence where T == Int {
384384
public typealias Element = Float
385385
public typealias Iterator = IndexingIterator<[Float]>
386386
public func makeIterator() -> Iterator { fatalError() }
387387
}
388388

389-
// SR-8324
389+
// https://github.com/apple/swift/issues/50852
390390
protocol ElementProtocol {
391391
associatedtype BaseElement: BaseElementProtocol = Self
392392
}
@@ -403,7 +403,8 @@ extension Array: NestedArrayProtocol where Element: ElementProtocol, Element: Ar
403403
// typealias BaseElement = Element.BaseElement
404404
}
405405

406-
// SR-8337
406+
// https://github.com/apple/swift/issues/50865
407+
407408
struct Foo<Bar> {}
408409

409410
protocol P {
@@ -426,13 +427,13 @@ extension BinaryInteger {
426427
}
427428
}
428429

429-
// SR-10992
430+
// https://github.com/apple/swift/issues/53382
430431

431-
protocol SR_10992_P {}
432-
struct SR_10992_S<T> {}
433-
extension SR_10992_S: SR_10992_P where T: SR_10992_P {} // expected-note {{requirement from conditional conformance of 'SR_10992_S<String>' to 'SR_10992_P'}}
432+
protocol P_53382 {}
433+
struct S_53382<T> {}
434+
extension S_53382: P_53382 where T: P_53382 {} // expected-note {{requirement from conditional conformance of 'S_53382<String>' to 'P_53382'}}
434435

435-
func sr_10992_foo(_ fn: (SR_10992_S<String>) -> Void) {}
436-
func sr_10992_bar(_ fn: (SR_10992_P) -> Void) {
437-
sr_10992_foo(fn) // expected-error {{global function 'sr_10992_foo' requires that 'String' conform to 'SR_10992_P'}}
436+
func f1_53382(_ fn: (S_53382<String>) -> Void) {}
437+
func f2_53382(_ fn: (P_53382) -> Void) {
438+
f1_53382(fn) // expected-error {{global function 'f1_53382' requires that 'String' conform to 'P_53382'}}
438439
}

test/Generics/conditional_conformances_literals.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %target-typecheck-verify-swift
22

3-
// rdar://problem/38461036 , https://bugs.swift.org/browse/SR-7192 and highlights the real problem in https://bugs.swift.org/browse/SR-6941
3+
// rdar://problem/38461036
4+
// https://github.com/apple/swift/issues/49740 and highlights the real problem
5+
// in https://github.com/apple/swift/issues/49489
46

57
protocol SameType {}
68
protocol Conforms {}

test/Generics/deduction.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,10 @@ class DeducePropertyParams {
309309
let badSet: Set = ["Hello"]
310310
}
311311

312-
// SR-69
313-
struct A {}
314-
func foo() {
312+
// https://github.com/apple/swift/issues/42691
313+
do {
314+
struct A {}
315+
315316
for i in min(1,2) { // expected-error{{for-in loop requires 'Int' to conform to 'Sequence'}}
316317
}
317318
let j = min(Int(3), Float(2.5)) // expected-error{{conflicting arguments to generic parameter 'T' ('Int' vs. 'Float')}}

test/Generics/generic-nested-in-extension-on-objc-class.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99

1010
import Foundation
1111

12+
// https://github.com/apple/swift/issues/53775
13+
//
1214
// Test the fix for a crash when instantiating the metadata for a generic type
1315
// nested in an extension on an ObjC class in a different file.
14-
// https://bugs.swift.org/browse/SR-11374
1516

1617
extension NSString {
1718
class _Inner2<T> where T: NSObject {}

test/Generics/invalid.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ class P<N> {
105105
// expected-error@-1 {{type 'N' constrained to non-protocol, non-class type 'A.XYZ'}}
106106
}
107107

108-
// SR-5579
108+
// https://github.com/apple/swift/issues/48151
109+
109110
protocol Foo {
110111
associatedtype Bar where Bar.Nonsense == Int // expected-error{{'Nonsense' is not a member type of type 'Self.Bar'}}
111112
}

test/Generics/non_generic_derived_class.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ class Derived : Base<Int> {}
1010

1111
var a = Derived.f(42)
1212

13-
protocol SR9160_EmptyProtocol {}
14-
class SR9160_AbstractFoobar<Foo> {}
13+
// https://github.com/apple/swift/issues/51655
14+
15+
protocol EmptyProtocol {}
16+
class AbstractFoobar<Foo> {}
1517
// This used to cause the swift compiler to never finish compiling.
16-
final class SR9160_SomeFoobar: SR9160_AbstractFoobar<SR9160_SomeFoobar.Foo> {
17-
enum Foo: SR9160_EmptyProtocol {}
18+
final class SomeFoobar: AbstractFoobar<SomeFoobar.Foo> {
19+
enum Foo: EmptyProtocol {}
1820
}

0 commit comments

Comments
 (0)