Skip to content

Commit 1f91a29

Browse files
authored
Merge pull request #17568 from CodaFi/fourward-march
[Gardening] Migrate More Tests To Swift 4
2 parents 0837072 + e3118f1 commit 1f91a29

Some content is hidden

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

54 files changed

+213
-216
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -module-name FactoryTest %s -o %t/a.out -swift-version 3
2+
// RUN: %target-build-swift -module-name FactoryTest %s -o %t/a.out
33
// RUN: %target-run %t/a.out | %FileCheck %s
44
// REQUIRES: executable_test
55
// REQUIRES: OS=macosx
66

77
import AppKit
88

9-
let image = NSImage(named: NSImageNameTrashEmpty)
9+
let image = NSImage(named: NSImage.Name.trashEmpty)
1010
// CHECK: TrashEmpty
1111
print(image!.name()!)

test/Interpreter/SDK/objc_mangling.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -module-name MangleTest %s -o %t/a.out -swift-version 3
2+
// RUN: %target-build-swift -module-name MangleTest %s -o %t/a.out
33
// RUN: %target-run %t/a.out | %FileCheck %s
44
// REQUIRES: executable_test
55

@@ -21,7 +21,7 @@ func checkClassName(_ cls: AnyClass, _ name: String, _ mangled: String)
2121
{
2222
// Class's name should appear unmangled.
2323
assert(NSStringFromClass(cls) == name)
24-
assert(NSStringFromClass(object_getClass(cls)) == name)
24+
assert(NSStringFromClass(object_getClass(cls)!) == name)
2525

2626
// Look up by unmangled name should work.
2727
// Look up by mangled name should also work.
@@ -47,7 +47,7 @@ func checkProtocolName(_ proto: Protocol, _ name: String, _ mangled: String)
4747

4848
func checkIvarName(_ cls: AnyClass, _ name: String)
4949
{
50-
let ivarName = ivar_getName(class_getInstanceVariable(cls, name))
50+
let ivarName = ivar_getName(class_getInstanceVariable(cls, name)!)
5151
let s = ivarName != nil ? String(cString: ivarName!) : Optional.none
5252
assert(name == s)
5353
}

test/Interpreter/SDK/object_literals.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %empty-directory(%t/Test.app/Contents/MacOS)
33
// RUN: cp -r %S/Inputs/object_literals-Resources %t/Test.app/Contents/Resources
4-
// RUN: %target-build-swift %s -o %t/Test.app/Contents/MacOS/main -swift-version 3
4+
// RUN: %target-build-swift %s -o %t/Test.app/Contents/MacOS/main
55
// RUN: %target-run %t/Test.app/Contents/MacOS/main
66

77
// REQUIRES: executable_test
@@ -21,7 +21,7 @@ LiteralsTestSuite.test("file") {
2121
}
2222

2323
LiteralsTestSuite.test("image") {
24-
let image = #imageLiteral(resourceName: NSImageNameComputer)
24+
let image = #imageLiteral(resourceName: NSImage.Name.computer.rawValue)
2525
expectTrue(image.isValid)
2626
}
2727

test/Interpreter/enum.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift %s -o %t/a.out -swift-version 3
2+
// RUN: %target-build-swift %s -o %t/a.out
33
// RUN: %target-run %t/a.out | %FileCheck %s
44
// REQUIRES: executable_test
55

@@ -520,10 +520,10 @@ func presentEitherOrsOf<T, U>(t: T, u: U) {
520520
presentEitherOr(EitherOr<T, U>.Right(u))
521521
}
522522

523-
presentEitherOr(EitherOr<(), ()>.Left()) // CHECK-NEXT: Left(())
523+
presentEitherOr(EitherOr<(), ()>.Left(())) // CHECK-NEXT: Left(())
524524
presentEitherOr(EitherOr<(), ()>.Middle) // CHECK-NEXT: Middle
525525
presentEitherOr(EitherOr<(), ()>.Center) // CHECK-NEXT: Center
526-
presentEitherOr(EitherOr<(), ()>.Right()) // CHECK-NEXT: Right(())
526+
presentEitherOr(EitherOr<(), ()>.Right(())) // CHECK-NEXT: Right(())
527527

528528
// CHECK-NEXT: Left(())
529529
// CHECK-NEXT: Middle
@@ -542,7 +542,7 @@ presentEitherOr(EitherOr<Int, String>.Right("foo")) // CHECK-NEXT: Right(foo)
542542
// CHECK-NEXT: Right(foo)
543543
presentEitherOrsOf(t: 1, u: "foo")
544544

545-
presentEitherOr(EitherOr<(), String>.Left()) // CHECK-NEXT: Left(())
545+
presentEitherOr(EitherOr<(), String>.Left(())) // CHECK-NEXT: Left(())
546546
presentEitherOr(EitherOr<(), String>.Middle) // CHECK-NEXT: Middle
547547
presentEitherOr(EitherOr<(), String>.Center) // CHECK-NEXT: Center
548548
presentEitherOr(EitherOr<(), String>.Right("foo")) // CHECK-NEXT: Right(foo)

test/Interpreter/imported_objc_generics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
//
33
// RUN: %target-clang -fobjc-arc %S/Inputs/ObjCClasses/ObjCClasses.m -c -o %t/ObjCClasses.o
4-
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out -swift-version 3
4+
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out
55
// RUN: %target-run %t/a.out
66

77
// REQUIRES: executable_test
@@ -111,7 +111,7 @@ ImportedObjCGenerics.test("ClassConstraints") {
111111
expectEqual("woof", makeContainedAnimalMakeNoise(x: petCarrier))
112112
}
113113

114-
class ClassWithMethodsUsingObjCGenerics: NSObject {
114+
@objc @objcMembers class ClassWithMethodsUsingObjCGenerics: NSObject {
115115
func copyContainer(_ x: CopyingContainer<NSString>) -> CopyingContainer<NSString> {
116116
return x
117117
}

test/Interpreter/imported_objc_generics_extension.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
//
33
// RUN: %target-clang -fobjc-arc %S/Inputs/ObjCClasses/ObjCClasses.m -c -o %t/ObjCClasses.o
4-
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out -swift-version 3
4+
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out
55
// RUN: %target-run %t/a.out
66

77
// REQUIRES: executable_test
@@ -14,8 +14,8 @@ import ObjCClasses
1414

1515
var ImportedObjCGenericExtension = TestSuite("ImportedObjCGenericExtension")
1616

17-
extension Container {
18-
func returnSelf() -> Self {
17+
@objc extension Container {
18+
@objc func returnSelf() -> Self {
1919
return self
2020
}
2121
}

test/Interpreter/objc_class_properties.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22

33
// RUN: %clang %target-cc-options -isysroot %sdk -fobjc-arc %S/Inputs/ObjCClasses/ObjCClasses.m -c -o %t/ObjCClasses.o
4-
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out -swift-version 3
4+
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out
55
// RUN: %target-run %t/a.out
66

77
// REQUIRES: executable_test

test/Interpreter/objc_class_properties_runtime.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// RUN: %clang -arch x86_64 -mmacosx-version-min=10.11 -isysroot %sdk -fobjc-arc %S/Inputs/ObjCClasses/ObjCClasses.m -c -o %t/ObjCClasses.o
44

5-
// RUN: %swiftc_driver -target $(echo '%target-triple' | sed -E -e 's/macosx10.(9|10).*/macosx10.11/') -sdk %sdk -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out -swift-version 3
5+
// RUN: %swiftc_driver -target $(echo '%target-triple' | sed -E -e 's/macosx10.(9|10).*/macosx10.11/') -sdk %sdk -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out
66
// RUN: %t/a.out
77

88
// REQUIRES: OS=macosx
@@ -76,7 +76,7 @@ ClassProperties.test("runtime")
7676
let prop = class_getProperty(object_getClass(theClass), "value")
7777
expectNotNil(prop)
7878

79-
let nameAsCString = property_getName(prop)!
79+
let nameAsCString = property_getName(prop!)
8080
expectNotNil(nameAsCString)
8181
expectEqual("value", String(cString: nameAsCString))
8282
}

test/Misc/misc_diagnostics.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

33
// REQUIRES: objc_interop
44

@@ -135,9 +135,9 @@ func test20770032() {
135135

136136

137137

138-
func tuple_splat1(_ a : Int, _ b : Int) { // expected-note {{'tuple_splat1' declared here}}
138+
func tuple_splat1(_ a : Int, _ b : Int) { // expected-note 2 {{'tuple_splat1' declared here}}
139139
let x = (1,2)
140-
tuple_splat1(x) // expected-error {{passing 2 arguments to a callee as a single tuple value has been removed in Swift 3}}
140+
tuple_splat1(x) // expected-error {{missing argument for parameter #2 in call}}
141141
tuple_splat1(1, 2) // Ok.
142142
tuple_splat1((1, 2)) // expected-error {{missing argument for parameter #2 in call}}
143143
}

test/NameBinding/Inputs/multi-file-with-main/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Swift
22

3-
infix operator +++ {}
3+
infix operator +++
44

55
func +++(a: Int, b: Int) -> Int {
66
return a + b

test/NameBinding/Inputs/reference-dependencies-helper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func getOtherFileIntArray() -> OtherFileIntArray { return OtherFileIntArray() }
3030

3131
typealias OtherFileAliasForSecret = OtherFileSecretTypeWrapper.SecretType
3232

33-
prefix operator *** {}
34-
prefix operator ~~~~~ {}
33+
prefix operator ***
34+
prefix operator ~~~~~
3535

3636
prefix operator ****
3737
infix operator *****

test/NameBinding/multi-file-with-main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -typecheck -enable-source-import -primary-file %s %S/Inputs/multi-file-with-main/main.swift -module-name=MultiFile -sdk "" -verify -swift-version 3
1+
// RUN: %target-swift-frontend -typecheck -enable-source-import -primary-file %s %S/Inputs/multi-file-with-main/main.swift -module-name=MultiFile -sdk "" -verify
22

33
func testOperator() {
44
let x: Int = 1 +++ "abc" // expected-error {{binary operator '+++' cannot be applied to operands of type 'Int' and 'String'}} expected-note {{expected an argument list of type '(Int, Int)'}}

test/NameBinding/name_lookup.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -typo-correction-limit 100 -swift-version 3
1+
// RUN: %target-typecheck-verify-swift -typo-correction-limit 100
22

33
class ThisBase1 {
44
init() { }
@@ -525,10 +525,10 @@ class r21677702 {
525525
}
526526

527527

528-
// <rdar://problem/16954496> lazy properties must use "self." in their body, and can weirdly refer to class variables directly
528+
// <rdar://problem/31762378> lazy properties don't have to use "self." in their initializers.
529529
class r16954496 {
530530
func bar() {}
531-
lazy var x: Array<() -> Void> = [bar] // expected-error {{cannot convert value of type '(r16954496) -> () -> ()' to expected element type '() -> Void'}}
531+
lazy var x: Array<() -> Void> = [bar]
532532
}
533533

534534

test/NameBinding/reference-dependencies-dynamic-lookup.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp %s %t/main.swift
3-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - -swift-version 3 > %t.swiftdeps
3+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - > %t.swiftdeps
44
// RUN: %FileCheck %s < %t.swiftdeps
55
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.swiftdeps
66

77
// Check that the output is deterministic.
8-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - -swift-version 3 > %t-2.swiftdeps
8+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - > %t-2.swiftdeps
99
// RUN: diff %t.swiftdeps %t-2.swiftdeps
1010

1111
// REQUIRES: objc_interop
@@ -14,7 +14,7 @@ import Foundation
1414

1515
// CHECK-LABEL: provides-dynamic-lookup:
1616

17-
@objc class Base : NSObject {
17+
@objc @objcMembers class Base : NSObject {
1818
// CHECK-DAG: - "foo"
1919
func foo() {}
2020

test/NameBinding/reference-dependencies.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp %s %t/main.swift
3-
// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - -swift-version 3 > %t.swiftdeps
3+
// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - > %t.swiftdeps
44
// RUN: %FileCheck %s < %t.swiftdeps
55
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.swiftdeps
66

77
// Check that the output is deterministic.
8-
// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - -swift-version 3 > %t-2.swiftdeps
8+
// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - > %t-2.swiftdeps
99
// RUN: diff %t.swiftdeps %t-2.swiftdeps
1010

1111
// CHECK-LABEL: {{^provides-top-level:$}}

test/Parse/operator_decl.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

3-
prefix operator +++ {} // expected-warning {{operator should no longer be declared with body}} {{20-23=}}
4-
postfix operator +++ {} // expected-warning {{operator should no longer be declared with body}} {{21-24=}}
5-
infix operator +++ {} // expected-warning {{operator should no longer be declared with body}} {{19-22=}}
6-
infix operator +++* { // expected-warning {{operator should no longer be declared with body; use a precedence group instead}} {{none}}
3+
prefix operator +++ {} // expected-error {{operator should no longer be declared with body}} {{20-23=}}
4+
postfix operator +++ {} // expected-error {{operator should no longer be declared with body}} {{21-24=}}
5+
infix operator +++ {} // expected-error {{operator should no longer be declared with body}} {{19-22=}}
6+
infix operator +++* { // expected-error {{operator should no longer be declared with body; use a precedence group instead}} {{none}}
77
associativity right
88
}
9-
infix operator +++*+ : A { } // expected-warning {{operator should no longer be declared with body}} {{25-29=}}
9+
infix operator +++*+ : A { } // expected-error {{operator should no longer be declared with body}} {{25-29=}}
1010

1111

1212
prefix operator +++** : A { }
1313
// expected-error@-1 {{only infix operators may declare a precedence}} {{23-27=}}
14-
// expected-warning@-2 {{operator should no longer be declared with body}} {{26-30=}}
14+
// expected-error@-2 {{operator should no longer be declared with body}} {{26-30=}}
1515

1616
prefix operator ++*++ : A
1717
// expected-error@-1 {{only infix operators may declare a precedence}} {{23-26=}}
1818

1919
postfix operator ++*+* : A { }
2020
// expected-error@-1 {{only infix operators may declare a precedence}} {{24-28=}}
21-
// expected-warning@-2 {{operator should no longer be declared with body}} {{27-31=}}
21+
// expected-error@-2 {{operator should no longer be declared with body}} {{27-31=}}
2222

2323
postfix operator ++**+ : A
2424
// expected-error@-1 {{only infix operators may declare a precedence}} {{24-27=}}
@@ -28,11 +28,11 @@ operator ++*** : A
2828

2929
operator +*+++ { }
3030
// expected-error@-1 {{operator must be declared as 'prefix', 'postfix', or 'infix'}}
31-
// expected-warning@-2 {{operator should no longer be declared with body}} {{15-19=}}
31+
// expected-error@-2 {{operator should no longer be declared with body}} {{15-19=}}
3232

3333
operator +*++* : A { }
3434
// expected-error@-1 {{operator must be declared as 'prefix', 'postfix', or 'infix'}}
35-
// expected-warning@-2 {{operator should no longer be declared with body}} {{19-23=}}
35+
// expected-error@-2 {{operator should no longer be declared with body}} {{19-23=}}
3636

3737
prefix operator // expected-error {{expected operator name in operator declaration}}
3838

test/Prototypes/UnicodeDecoders.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
// RUN: %target-build-swift %s -swift-version 3 -g -Onone -o %t
12+
// RUN: %target-build-swift %s -g -Onone -o %t
1313
// RUN: %target-run %t
1414
// REQUIRES: executable_test
1515

test/SIL/Parser/generic_signature_with_depth.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
// RUN: %target-swift-frontend -module-name generic_signature_with_depth %s -emit-silgen -swift-version 3 | %target-sil-opt | %FileCheck %s
2+
// RUN: %target-swift-frontend -module-name generic_signature_with_depth %s -emit-silgen | %target-sil-opt | %FileCheck %s
33

44
protocol mmGeneratorType {
55
associatedtype Element
@@ -15,8 +15,7 @@ protocol mmCollectionType : mmSequenceType {
1515
protocol mmExt : mmCollectionType {
1616
mutating func extend<
1717
S : mmSequenceType
18-
where S.Generator.Element == Self.Generator.Element
19-
> (_ seq: S)
18+
> (_ seq: S) where S.Generator.Element == Self.Generator.Element
2019
}
2120

2221
// CHECK-LABEL: @$S28generic_signature_with_depth4testyxx_q_tAA5mmExtRzAaCR_9Generator_7ElementQY_AD_AERTzr0_lF : $@convention(thin) <EC1, EC2 where EC1 : mmExt, EC2 : mmExt, EC1.Generator.Element == EC2.Generator.Element> (@in_guaranteed EC1, @in_guaranteed EC2) -> @out EC1 {
@@ -26,9 +25,8 @@ protocol mmExt : mmCollectionType {
2625
func test<
2726
EC1 : mmExt,
2827
EC2 : mmExt
29-
where EC1.Generator.Element == EC2.Generator.Element
3028
>
31-
(_ lhs: EC1, _ rhs: EC2) -> EC1 {
29+
(_ lhs: EC1, _ rhs: EC2) -> EC1 where EC1.Generator.Element == EC2.Generator.Element {
3230
var lhs = lhs
3331
lhs.extend(rhs)
3432
return lhs

test/SIL/Parser/question_mark.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
// RUN: %target-swift-frontend %s -emit-silgen -swift-version 3 | %target-sil-opt
1+
// RUN: %target-swift-frontend %s -emit-silgen | %target-sil-opt
22

3-
infix operator ?? {
4-
associativity right
5-
precedence 110
6-
}
3+
infix operator ??
74

85
struct A<V, E> {
96
}

test/SIL/Parser/self.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %target-swift-frontend %s -emit-silgen -swift-version 3 | %target-sil-opt
1+
// RUN: %target-swift-frontend %s -emit-silgen | %target-sil-opt
22

33
import Swift
44
protocol P {
55
func join<
6-
S : Sequence where S.Iterator.Element == Self
7-
>(elements: S) -> Self
6+
S : Sequence
7+
>(elements: S) -> Self where S.Iterator.Element == Self
88
}

test/SIL/Parser/where.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// RUN: %target-swift-frontend %s -emit-silgen -swift-version 3 | %target-sil-opt
1+
// RUN: %target-swift-frontend %s -emit-silgen | %target-sil-opt
22

33
import Swift
44
protocol P {
55
associatedtype CodeUnit
66
mutating func decode<
7-
G : IteratorProtocol where G.Element == CodeUnit
8-
>(next: inout G) -> Int
7+
G : IteratorProtocol
8+
>(next: inout G) -> Int where G.Element == CodeUnit
99
}

test/SIL/Serialization/Inputs/def_generic_marker.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ public protocol mmSequenceType {
99
public protocol mmCollectionType : mmSequenceType {
1010
mutating func extend<
1111
S : mmSequenceType
12-
where S.Generator.Element == Self.Generator.Element
13-
> (_ seq: S)
12+
> (_ seq: S) where S.Generator.Element == Self.Generator.Element
1413
}
1514

1615
@inlinable
1716
public func test<
1817
EC1 : mmCollectionType,
1918
EC2 : mmCollectionType
19+
> (_ lhs: EC1, _ rhs: EC2) -> EC1
2020
where EC1.Generator.Element == EC2.Generator.Element
21-
> (_ lhs: EC1, _ rhs: EC2) -> EC1 {
21+
{
2222
var lhs = lhs
2323
lhs.extend(rhs)
2424
return lhs

test/SIL/Serialization/deserialize_generic_marker.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
// RUN: %empty-directory(%t)
3-
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_generic_marker.swift -swift-version 3
3+
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_generic_marker.swift
44
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -performance-linker -I %t %s | %FileCheck %s
55

66
// Make sure that SILFunctionType with GenericSignature can match up with

0 commit comments

Comments
 (0)