Skip to content

Commit b9d7201

Browse files
committed
Update test/Constraints/pack_expansion_types.swift for new syntax
1 parent 55210f6 commit b9d7201

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/Constraints/pack_expansion_types.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
// RUN: %target-typecheck-verify-swift -enable-experimental-variadic-generics
22

3-
func returnTuple1<@_typeSequence T>() -> (T...) { fatalError() }
3+
func returnTuple1<T...>() -> (T...) { fatalError() }
44

5-
func returnTuple2<@_typeSequence T>() -> (Int, T...) { fatalError() }
5+
func returnTuple2<T...>() -> (Int, T...) { fatalError() }
66

7-
func returnTupleLabel1<@_typeSequence T>() -> (x: T...) { fatalError() }
7+
func returnTupleLabel1<T...>() -> (x: T...) { fatalError() }
88

9-
func returnTupleLabel2<@_typeSequence T>() -> (Int, x: T...) { fatalError() }
9+
func returnTupleLabel2<T...>() -> (Int, x: T...) { fatalError() }
1010

11-
func returnTupleLabel3<@_typeSequence T>() -> (Int, T..., y: Float) { fatalError() }
11+
func returnTupleLabel3<T...>() -> (Int, T..., y: Float) { fatalError() }
1212
// expected-note@-1 {{in call to function 'returnTupleLabel3()'}}
1313

14-
func returnTupleLabel4<@_typeSequence T>() -> (Int, x: T..., y: Float) { fatalError() }
14+
func returnTupleLabel4<T...>() -> (Int, x: T..., y: Float) { fatalError() }
1515

16-
func returnTupleLabel5<@_typeSequence T, @_typeSequence U>() -> (Int, T..., y: U...) { fatalError() }
16+
func returnTupleLabel5<T..., U...>() -> (Int, T..., y: U...) { fatalError() }
1717
// expected-note@-1 {{in call to function 'returnTupleLabel5()'}}
1818

19-
func returnTupleLabel6<@_typeSequence T, @_typeSequence U>() -> (Int, x: T..., y: U...) { fatalError() }
19+
func returnTupleLabel6<T..., U...>() -> (Int, x: T..., y: U...) { fatalError() }
2020

2121
func concreteReturnTupleValid() {
2222
let _: () = returnTuple1()
@@ -66,7 +66,7 @@ func concreteReturnTypeInvalid() {
6666
let _: () = returnTupleLabel5() // expected-error {{type of expression is ambiguous without more context}}
6767
}
6868

69-
func genericReturnTupleValid<@_typeSequence T>(_: T...) {
69+
func genericReturnTupleValid<T...>(_: T...) {
7070
let _: (T...) = returnTuple1()
7171
let _: (Int, T...) = returnTuple1()
7272

@@ -92,7 +92,7 @@ func genericReturnTupleValid<@_typeSequence T>(_: T...) {
9292
let _: (Int, x: String, T..., y: Float, T...) = returnTupleLabel6()
9393
}
9494

95-
func genericReturnTupleInvalid<@_typeSequence T>(_: T...) {
95+
func genericReturnTupleInvalid<T...>(_: T...) {
9696
let _: (x: T...) = returnTuple1() // expected-error {{type of expression is ambiguous without more context}}
9797
let _: (x: Int, T...) = returnTuple1() // expected-error {{type of expression is ambiguous without more context}}
9898

@@ -119,13 +119,13 @@ func genericReturnTupleInvalid<@_typeSequence T>(_: T...) {
119119
let _: (T..., y: Int) = returnTupleLabel6() // expected-error {{cannot convert value of type '(Int, y: Int)' to specified type '(T..., y: Int)'}}
120120
}
121121

122-
func returnFunction1<@_typeSequence T>() -> (T...) -> () {}
122+
func returnFunction1<T...>() -> (T...) -> () {}
123123

124-
func returnFunction2<@_typeSequence T>() -> (Int, T...) -> () {} // expected-note {{in call to function 'returnFunction2()'}}
124+
func returnFunction2<T...>() -> (Int, T...) -> () {} // expected-note {{in call to function 'returnFunction2()'}}
125125

126-
func returnFunction3<@_typeSequence T>() -> (T..., Float) -> () {} // expected-note {{in call to function 'returnFunction3()'}}
126+
func returnFunction3<T...>() -> (T..., Float) -> () {} // expected-note {{in call to function 'returnFunction3()'}}
127127

128-
func returnFunction4<@_typeSequence T>() -> (Int, T..., Float) -> () {} // expected-note 2{{in call to function 'returnFunction4()'}}
128+
func returnFunction4<T...>() -> (Int, T..., Float) -> () {} // expected-note 2{{in call to function 'returnFunction4()'}}
129129

130130
func concreteReturnFunctionValid() {
131131
let _: () -> () = returnFunction1()

0 commit comments

Comments
 (0)