Skip to content

Commit 6fe9dd3

Browse files
Merge pull request #60718 from AnthonyLatsis/migrate-test-suite-to-gh-issues-9
2 parents dd627b4 + 93c964f commit 6fe9dd3

28 files changed

+185
-153
lines changed

test/CrossImport/horrible.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import UnitaryGoose
1616
// expected-error@-1 {{cannot list cross-import overlays for 'UnitaryGoose':}}
1717

1818
// FIXME: It might be better to diagnose these errors on HorribleGoose's import
19-
// decl, since they actually belong to HorribleGoose. (SR-12223)
19+
// decl, since they actually belong to HorribleGoose.
20+
// (https://github.com/apple/swift/issues/54649)
2021

2122
import FlockOfGoose
2223
// expected-error@-1 {{cannot load cross-import overlay for 'HorribleGoose' and 'FlockOfGoose':}}

test/CrossImport/remark-option.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -Rcross-import -I %t/include -I %t/lib/swift -F %t/Frameworks
55

66
import DeclaringLibrary
7-
// FIXME: Similarly to horrible.swift, ideally we would emit this remark on DeclaringLibrary
8-
// decl, since the cross-import overlay actually belongs to the DeclaringLibrary. (SR-12223)
7+
// FIXME: Similarly to horrible.swift, ideally we would emit this remark on
8+
// DeclaringLibrary decl, since the cross-import overlay actually belongs to
9+
// the DeclaringLibrary. (https://github.com/apple/swift/issues/54649)
910
import BystandingLibrary // expected-remark {{import of 'DeclaringLibrary' and 'BystandingLibrary' triggered a cross-import of '_OverlayLibrary'}}

test/DebugInfo/debug_variable.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import Swift
66

77
sil_scope 2 { loc "simple.swift":1:2 parent @test_debug_value : $@convention(thin) (Int) -> () }
88

9-
// SR-14868: Incorrect source location on `llvm.dbg.declare` when the input
10-
// is SIL file.
9+
// https://github.com/apple/swift/issues/57215
10+
// Incorrect source location on 'llvm.dbg.declare' when the input is a SIL file
1111

1212
// CHECK: @test_debug_value
1313
// CHECK-SAME: !dbg ![[FUNC_DI:[0-9]+]]

test/DebugInfo/optimizer_pipeline.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import Swift
66

77
// Test that DCE correctly preserves debug locations.
8-
// SR-15300: Compiler crash when using Builtin.unreachable in initializers
8+
9+
// https://github.com/apple/swift/issues/57622
10+
// Compiler crash when using 'Builtin.unreachable' in initializers
911
//
1012
// CHECK: sil_scope [[S1:[0-9]+]] { {{.*}} parent @$s18optimizer_pipeline1AVyACs13KeyValuePairsVyypypGcfC
1113
// CHECK: sil_scope [[S2:[0-9]+]] { {{.*}} parent [[S1]] }

test/DebugInfo/retroactive_conformance_witness_thunk.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -emit-ir -g -primary-file %s
22

3-
// https://bugs.swift.org/browse/SR-14016
3+
// https://github.com/apple/swift/issues/56409
44

55
public struct PowerCollection<C : Collection> : Collection {
66
public typealias Index = [C.Index]

test/decl/circularity.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ class D4 : C4, P1 { // expected-note 3 {{through reference here}}
110110
}
111111
}
112112

113-
// SR-12236
113+
// https://github.com/apple/swift/issues/54662
114114
// N.B. This used to compile in 5.1.
115-
protocol SR12236 { }
116-
class SR12236_A { // expected-note {{through reference here}}
117-
typealias Nest = SR12236 // expected-error {{circular reference}} expected-note {{through reference here}}
115+
protocol P_54662 { }
116+
class C_54662 { // expected-note {{through reference here}}
117+
typealias Nest = P_54662 // expected-error {{circular reference}} expected-note {{through reference here}}
118118
}
119-
extension SR12236_A: SR12236_A.Nest { }
119+
extension C_54662: C_54662.Nest { }

test/decl/enum/enumtest.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ func testSimpleEnum() {
299299
let _ : SimpleEnum=.X // expected-error {{'=' must have consistent whitespace on both sides}}
300300
}
301301

302-
enum SR510: String {
302+
// https://github.com/apple/swift/issues/43127
303+
enum E_43127: String {
303304
case Thing = "thing"
304305
case Bob = {"test"} // expected-error {{raw value for enum case must be a literal}}
305306
}
@@ -337,7 +338,8 @@ enum HasVariadic {
337338
case variadic(x: Int...) // expected-error {{variadic enum cases are not supported}}
338339
}
339340

340-
// SR-2176
341+
// https://github.com/apple/swift/issues/44784
342+
341343
enum Foo {
342344
case bar
343345
case none
@@ -446,7 +448,7 @@ protocol P {}
446448
enum E : C & P {}
447449
// expected-error@-1 {{inheritance from class-constrained protocol composition type 'C & P'}}
448450

449-
// SR-11522
451+
// https://github.com/apple/swift/issues/53923
450452

451453
enum EnumWithStaticNone1 {
452454
case a
@@ -573,7 +575,7 @@ let _: EnumWithTypealiasNone? = .none // Okay
573575
let _: EnumWithBothStructAndComputedNone? = .none // Okay
574576
let _: EnumWithBothTypealiasAndComputedNone? = .none // Okay
575577

576-
// SR-12063
578+
// https://github.com/apple/swift/issues/54499
577579

578580
let foo1: Foo? = Foo.none
579581
let foo2: Foo?? = Foo.none

test/decl/enum/special_case_name.swift

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

3-
// https://bugs.swift.org/browse/SR-1660
3+
// https://github.com/apple/swift/issues/44269
44

55
enum DayOfTheWeek : Int {
66
case monday = 0

test/decl/ext/extensions.swift

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ extension X3 {
122122
func foo() -> Int { return 0 }
123123
}
124124

125-
// Make sure the test case from https://bugs.swift.org/browse/SR-3847 doesn't
126-
// cause problems when the later extension is incorrectly nested inside another
127-
// declaration.
125+
// Make sure the test case from https://github.com/apple/swift/issues/46432
126+
// doesn't cause problems when the later extension is incorrectly nested inside
127+
// another declaration.
128128
extension C1.NestedStruct {
129129
static let originalValue = 0
130130
}
@@ -135,7 +135,7 @@ struct WrapperContext {
135135
}
136136

137137
// Class-constrained extension where protocol does not impose class requirement
138-
// SR-11298
138+
// https://github.com/apple/swift/issues/53699
139139

140140
protocol DoesNotImposeClassReq_1 {}
141141

@@ -352,11 +352,12 @@ extension Tree.BoughPayload.Contents {
352352
// expected-note@-2 {{did you mean to extend 'Nest<Int>' instead?}}
353353
}
354354

355-
// SR-10466 Check 'where' clause when referencing type defined inside extension
356-
struct SR_10466<T> {
357-
var a : A // expected-error {{'SR_10466<T>.A' (aka 'Int') requires the types 'T' and 'Never' be equivalent}}
355+
// https://github.com/apple/swift/issues/52866
356+
// Check 'where' clause when referencing type defined inside extension.
357+
struct S_52866<T> {
358+
var a : A // expected-error {{'S_52866<T>.A' (aka 'Int') requires the types 'T' and 'Never' be equivalent}}
358359
}
359-
extension SR_10466 where T == Never { // expected-note {{requirement specified as 'T' == 'Never' [with T = T]}}
360+
extension S_52866 where T == Never { // expected-note {{requirement specified as 'T' == 'Never' [with T = T]}}
360361
typealias A = Int
361362
}
362363

test/decl/ext/generic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ extension Array2 where QQQ : VVV {}
175175
// expected-error@-1 {{cannot find type 'QQQ' in scope}}
176176
// expected-error@-2 {{cannot find type 'VVV' in scope}}
177177

178-
// https://bugs.swift.org/browse/SR-9009
178+
// https://github.com/apple/swift/issues/51512
179179
func foo() {
180180
extension Array where Element : P1 {
181181
// expected-error@-1 {{declaration is only valid at file scope}}

test/decl/ext/ordering.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ extension OtherOuter5 {
122122
class Super {}
123123
}
124124

125-
/// SR-5993
125+
/// https://github.com/apple/swift/issues/48550
126126

127127
enum Outer5A {}
128128

test/decl/ext/protocol.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ extension ExtendedProtocol where Self : DerivedWithAlias {
288288
func f4(x: NestedNominal) {}
289289
}
290290

291-
// rdar://problem/21991470 & https://bugs.swift.org/browse/SR-5022
291+
// rdar://problem/21991470
292+
// https://github.com/apple/swift/issues/47598
293+
292294
class NonPolymorphicInit {
293295
init() { } // expected-note {{selected non-required initializer 'init()'}}
294296
}

test/decl/ext/specialize.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let _ = [1, 2, 3].makeString() // expected-error 3 {{cannot convert value of typ
1515

1616
extension Set<_> {} // expected-error {{cannot extend a type that contains placeholders}}
1717

18-
// https://bugs.swift.org/browse/SR-4875
18+
// https://github.com/apple/swift/issues/47452
1919

2020
struct Foo<T, U> {
2121
var x: T

test/decl/ext/sr_12460.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s 2>&1 | %FileCheck -check-prefix CHECK %s
22

3-
// Test that we don't crash when validating members inside an extension with no type name.
3+
// https://github.com/apple/swift/issues/54900
4+
//
5+
// Test that we don't crash when validating members inside an extension with no
6+
// type name.
47

58
// CHECK: :[[@LINE+1]]:11: error: expected type name in extension declaration
69
extension {

test/decl/func/default-values-swift4.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public func publicFunctionWithDefaultValue(
9393
y: Int = internalIntFunction()) {}
9494
// expected-error@-1 {{global function 'internalIntFunction()' is internal and cannot be referenced from a default argument value}}
9595

96-
// https://bugs.swift.org/browse/SR-5559
96+
// https://github.com/apple/swift/issues/48131
9797
public class MyClass {
9898
public func method<T>(_: T.Type = T.self) -> T { }
9999
}

test/decl/func/default-values.swift

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ struct X<T> {
123123
let testXa: X<Int> = .foo(i: 0)
124124
let testXb: X<Int> = .bar
125125

126-
// SR-10062
126+
// https://github.com/apple/swift/issues/52464
127127

128128
var aLiteral = 1
129129
let bLiteral = 2
@@ -175,16 +175,21 @@ let fooThing5 = Foo(a: 0, d: 1, h: nil) // expected-error {{missing arguments fo
175175
let fooThing6 = Foo(a: 0, d: 1, e: 2, h: nil) // expected-error {{missing argument for parameter 'f' in call}}
176176
// expected-note@-29 {{'init(a:b:d:e:f:g:h:)' declared here}}
177177

178-
// SR-11085
179-
func sr_11085(x: Int) {}
180-
func sr_11085(line: String = #line) {} // expected-error {{default argument value of type 'Int' cannot be converted to type 'String'}}
181-
sr_11085()
178+
// https://github.com/apple/swift/issues/53477
179+
do {
180+
func f(x: Int) {}
181+
func f(line: String = #line) {} // expected-error {{default argument value of type 'Int' cannot be converted to type 'String'}}
182+
f()
182183

183-
class SR_11085_C { init(line: String = #line) {} } // expected-error {{default argument value of type 'Int' cannot be converted to type 'String'}}
184-
let _ = SR_11085_C()
184+
class C { init(line: String = #line) {} } // expected-error {{default argument value of type 'Int' cannot be converted to type 'String'}}
185+
let _ = C()
186+
}
187+
188+
// https://github.com/apple/swift/issues/54034
185189

186-
// SR-11623
187-
func badGenericMagicLiteral<T : ExpressibleByIntegerLiteral>(_ x: T = #function) -> T { x } // expected-error {{default argument value of type 'String' cannot be converted to type 'T'}}
190+
// FIXME: Bad diagnostic
191+
// expected-error@+1 {{default argument value of type 'String' cannot be converted to type 'T'}}
192+
func badGenericMagicLiteral<T : ExpressibleByIntegerLiteral>(_ x: T = #function) -> T { x }
188193
let _: Int = badGenericMagicLiteral()
189194

190195
func genericMagicLiteral<T : ExpressibleByIntegerLiteral>(_ x: T = #line) -> T { x } // expected-note {{where 'T' = 'String'}}

test/decl/func/functions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func parentheticalInout2(_ fn: (((inout Int)), Int) -> ()) {
181181
fn(&value, 0)
182182
}
183183

184-
// SR-11724
184+
// https://github.com/apple/swift/issues/54133
185185
// FIXME: None of these diagnostics is particularly good.
186186
func bogusDestructuring() {
187187
struct Bar {}

test/decl/func/rethrows.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ func testDoRethrow() {
536536
DoRethrowGeneric<Int>().method(fn:) { (a, b) in return a }
537537
}
538538

539-
// https://bugs.swift.org/browse/SR-7120 - capture lists
539+
// https://github.com/apple/swift/issues/49668
540540
func rethrowsWithCaptureList<R, T>(
541541
array: [T],
542542
operation: (Int) throws -> R
@@ -553,10 +553,10 @@ public func rdar40472018() {
553553
}
554554

555555

556-
// https://bugs.swift.org/browse/SR-6299
556+
// https://github.com/apple/swift/issues/48849
557557
// Verify that we do not emit an invalid
558558
// "... can throw but the expression is not marked with 'try'"
559-
// error on the use of the operators.
559+
// error on the use of operators.
560560

561561
infix operator <|: infixr0
562562
infix operator |>: infixl1
@@ -613,12 +613,16 @@ func rdar_47550715() {
613613
func bar(_: A<F>? = .none) {} // Ok
614614
}
615615

616-
// SR-14270 - test case for diagnostic note 'because_rethrows_default_argument_throws'
616+
// https://github.com/apple/swift/issues/56630
617+
// Test cases for diagnostic note 'because_rethrows_default_argument_throws'
618+
617619
func nonThrowableDefaultRethrows(_ f: () throws -> () = {}) rethrows {
618620
try f()
619621
}
620-
// NOTE: This should compile and not emit a diagnostic because ideally the compiler could statically
621-
// know the default argument value could never throw. See SR-1524.
622+
623+
// FIXME: This should compile and not emit a diagnostic because ideally the
624+
// compiler could statically know the default argument value could never throw.
625+
// (https://github.com/apple/swift/issues/44143)
622626
nonThrowableDefaultRethrows() // expected-error {{call can throw but is not marked with 'try'}}
623627
// expected-note@-1 {{call is to 'rethrows' function, but a defaulted argument function can throw}}
624628

test/decl/func/throwing_functions_without_try.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ func baz2() -> Int {
5252
return x
5353
}
5454

55-
// SR-11016
55+
// https://github.com/apple/swift/issues/53406
5656

57-
protocol SR_11016_P {
57+
protocol P_53406 {
5858
func bar() throws
5959
}
6060

61-
class SR_11016_C {
62-
var foo: SR_11016_P?
61+
class C_53406 {
62+
var foo: P_53406?
6363

6464
func someMethod() throws {
6565
foo?.bar() // expected-error {{call can throw but is not marked with 'try'}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-typecheck-verify-swift
22

3-
// SR-4205: Don't warn about non-trailing closures followed by parameters with
3+
// https://github.com/apple/swift/issues/46788
4+
// Don't warn about non-trailing closures followed by parameters with
45
// default arguments.
56
func f1(_ f: () -> (), bar: Int = 10) { } // no-warning

test/decl/inherit/inherit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class C : B, A { } // expected-error{{multiple inheritance from classes 'B' and
1818
// Superclass in the wrong position
1919
class D : P, A { } // expected-error{{superclass 'A' must appear first in the inheritance clause}}{{12-15=}}{{11-11=A, }}
2020

21-
// SR-8160
21+
// https://github.com/apple/swift/issues/50692
2222
class D1 : Any, A { } // expected-error{{superclass 'A' must appear first in the inheritance clause}}{{15-18=}}{{12-12=A, }}
2323

2424
class D2 : P & P1, A { } // expected-error{{superclass 'A' must appear first in the inheritance clause}}{{18-21=}}{{12-12=A, }}

test/decl/inherit/initializer.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,21 @@ func testClassInGenericFunc<T>(t: T) {
111111
}
112112

113113

114-
// <https://bugs.swift.org/browse/SR-5056> Required convenience init inhibits inheritance
115-
116-
class SR5056A {
114+
// https://github.com/apple/swift/issues/47632
115+
// Required convenience 'init' inhibits inheritance
116+
do {
117+
class A {
117118
required init(a: Int) {}
118-
}
119+
}
119120

120-
class SR5056B : SR5056A {
121+
class B : A {
121122
required convenience init(b: Int) {
122123
self.init(a: b)
123124
}
124-
}
125+
}
125126

126-
class SR5056C : SR5056B {}
127+
class C : B {}
127128

128-
func useSR5056C() {
129-
_ = SR5056C(a: 0)
130-
_ = SR5056C(b: 0)
129+
_ = C(a: 0)
130+
_ = C(b: 0)
131131
}

0 commit comments

Comments
 (0)