You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_ =(repeat(each t,each u)) // expected-error {{pack expansion requires that 'U' and 'T' have the same shape}}
87
-
_ =(repeatArray<(eachT,eachU)>()) // expected-error {{pack expansion requires that 'U' and 'T' have the same shape}}
88
-
_ =(repeat(Array<eachT>(),each u)) // expected-error {{pack expansion requires that 'U' and 'T' have the same shape}}
86
+
_ =(repeat(each t,each u)) // expected-error {{pack expansion requires that 'each U' and 'each T' have the same shape}}
87
+
_ =(repeatArray<(eachT,eachU)>()) // expected-error {{pack expansion requires that 'each U' and 'each T' have the same shape}}
88
+
_ =(repeat(Array<eachT>(),each u)) // expected-error {{pack expansion requires that 'each U' and 'each T' have the same shape}}
89
89
}
90
90
91
91
func returnPackExpansionType<eachT>(_ t:repeateachT)->repeateachT{ // expected-error {{pack expansion 'repeat each T' can only appear in a function parameter list, tuple element, or generic argument list}}
@@ -133,7 +133,7 @@ func tupleExpansion<each T, each U>(
// expected-error@-1 {{'(Int, repeat each T, y: Float)' is not convertible to '(repeat each T, y: Float)', tuples have a different number of elements}}
153
-
// expected-error@-2 {{generic parameter 'T' could not be inferred}}
153
+
// expected-error@-2 {{generic parameter 'each T' could not be inferred}}
154
154
155
155
let _:(Int,String,repeateachT, x:Float)=returnTupleLabel3()
156
156
// expected-error@-1 {{'(Int, repeat each T, y: Float)' is not convertible to '(Int, String, repeat each T, x: Float)', tuples have a different number of elements}}
157
-
// expected-error@-2 {{generic parameter 'T' could not be inferred}}
157
+
// expected-error@-2 {{generic parameter 'each T' could not be inferred}}
158
158
159
159
let _:(repeateachT, y:Float)=returnTupleLabel4() // error at declaration
let _:()->()=returnFunction2() // expected-error {{cannot convert value of type '(Int, repeat each T) -> ()' to specified type '() -> ()'}}
200
-
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
200
+
// expected-error@-1 {{generic parameter 'each T' could not be inferred}}
201
201
202
202
let _:(String)->()=returnFunction2() // expected-error {{cannot convert value of type '(Int) -> ()' to specified type '(String) -> ()'}}
203
203
let _:(String,Int)->()=returnFunction2() // expected-error {{cannot convert value of type '(Int, Int) -> ()' to specified type '(String, Int) -> ()'}}
204
204
205
205
let _:()->()=returnFunction3() // expected-error {{cannot convert value of type '(repeat each T, Float) -> ()' to specified type '() -> ()'}}
206
-
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
206
+
// expected-error@-1 {{generic parameter 'each T' could not be inferred}}
207
207
208
208
let _:(Float,Int)->()=returnFunction3() // expected-error {{cannot convert value of type '(Float, Float) -> ()' to specified type '(Float, Int) -> ()'}}
209
209
let _:(Float,Double,String)->()=returnFunction3() // expected-error {{cannot convert value of type '(Float, Double, Float) -> ()' to specified type '(Float, Double, String) -> ()'}}
210
210
211
211
let _:()->()=returnFunction4() // expected-error {{cannot convert value of type '(Int, repeat each T, Float) -> ()' to specified type '() -> ()'}}
212
-
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
212
+
// expected-error@-1 {{generic parameter 'each T' could not be inferred}}
213
213
214
214
let _:(Int)->()=returnFunction4() // expected-error {{cannot convert value of type '(Int, repeat each T, Float) -> ()' to specified type '(Int) -> ()'}}
215
-
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
215
+
// expected-error@-1 {{generic parameter 'each T' could not be inferred}}
216
216
217
217
let _:(Float,Int)->()=returnFunction4() // expected-error {{cannot convert value of type '(Int, Float) -> ()' to specified type '(Float, Int) -> ()'}}
let _:(repeatSet<eachT>)=patternInstantiationTupleTest1() // expected-error {{cannot convert value of type '(repeat Array<each T>)' to specified type '(repeat Set<each T>)}}
290
-
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
290
+
// expected-error@-1 {{generic parameter 'each T' could not be inferred}}
291
291
292
292
let _:(repeatArray<eachT>,Set<String>)=patternInstantiationTupleTest1() // expected-error {{type of expression is ambiguous without more context}}
// expected-note@-1 {{requirement specified as 'T.Element' == 'U.Element' [with each T = Array<Int>, Array<String>; each U = Set<String>, Set<Int>]}}
27
-
// expected-note@-2 {{requirement specified as 'T.Element' == 'U.Element' [with each T = Array<Int>; each U = Set<Int>, Set<String>]}}
26
+
// expected-note@-1 {{requirement specified as '(each T).Element' == '(each U).Element' [with each T = Array<Int>, Array<String>; each U = Set<String>, Set<Int>]}}
27
+
// expected-note@-2 {{requirement specified as '(each T).Element' == '(each U).Element' [with each T = Array<Int>; each U = Set<Int>, Set<String>]}}
0 commit comments