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
@SimpleArrayBuilder<(Int, _)> // expected-error {{unable to infer generic arguments for result builder @SimpleArrayBuilder<(Int, _)>}} expeced-error {{cannot convert return expression of type '(String, Int)' to return type '[(String, Int)]'}}
1160
+
varelements5:[(String,Int)]{
1161
+
("foo",42) // expected-error {{cannot convert return expression of type '(String, Int)' to return type '[(String, Int)]'}}
1162
+
}
1163
+
1164
+
@SimpleArrayBuilder<(_, String)>
1165
+
varelements6:[(String,Int)]{ // expected-error {{cannot convert return expression of type '[(String, String)]' to return type '[(String, Int)]'}} expected-note {{arguments to generic parameter 'Element' ('(String, String)' and '(String, Int)') are expected to be equal}}
1166
+
("foo",42) // expected-error {{cannot convert value of type '(String, Int)' to expected argument type '(String, String)'}}
1167
+
}
1168
+
1169
+
@SimpleArrayBuilder<(Int,String)>
1170
+
varelements7:[(String,Int)]{ // expected-error {{cannot convert return expression of type '[(Int, String)]' to return type '[(String, Int)]'}} expected-note {{arguments to generic parameter 'Element' ('(Int, String)' and '(String, Int)') are expected to be equal}}
1171
+
("foo",42) // expected-error {{cannot convert value of type '(String, Int)' to expected argument type '(Int, String)'}}
1172
+
}
1173
+
1174
+
@SimpleDictionaryBuilder
1175
+
vardictionary:[String:Int]{
1176
+
("foo",42)
1177
+
}
1178
+
1179
+
@SimpleDictionaryBuilder<_,_>
1180
+
vardictionary2:[String:Int]{
1181
+
("foo",42)
1182
+
}
1183
+
1184
+
@SimpleDictionaryBuilder<String,_>
1185
+
vardictionary3:[String:Int]{
1186
+
("foo",42)
1187
+
}
1188
+
1189
+
@SimpleDictionaryBuilder<_,Int>
1190
+
vardictionary4:[String:Int]{
1191
+
("foo",42)
1192
+
}
1193
+
1194
+
@SimpleDictionaryBuilder<Int,_>
1195
+
vardictionary5:[String:Int]{ // expected-error {{cannot convert return expression of type '[Int : Int]' to return type '[String : Int]'}} expected-note {{arguments to generic parameter 'Key' ('Int' and 'String') are expected to be equal}}
1196
+
("foo",42) // expected-error {{cannot convert value of type '(String, Int)' to expected argument type '(Int, Int)'}}
("foo","bar") // expected-warning {{expression of type '(String, String)' is unused}}
1317
1389
("baaz","quux") // expected-warning {{expression of type '(String, String)' is unused}}
1318
1390
}
1391
+
1392
+
@Array<_>.Builder
1393
+
varelements2:[String]{
1394
+
"foo"
1395
+
"bar"
1396
+
}
1397
+
1398
+
@Array<String>.Builder
1399
+
varelements3:[String]{
1400
+
"foo"
1401
+
"bar"
1402
+
}
1403
+
1404
+
@Array<(_, _)>.Builder
1405
+
varelements4:[(String,Int)]{
1406
+
("foo",42)
1407
+
}
1408
+
1409
+
@Array<(String, _)>.Builder
1410
+
varelements5:[(String,Int)]{
1411
+
("foo",42)
1412
+
}
1413
+
1414
+
@Array<(_, Int)>.Builder
1415
+
varelements6:[(String,Int)]{
1416
+
("foo",42)
1417
+
}
1418
+
1419
+
@Array<(Int, _)>.Builder // expected-error {{unable to infer generic arguments for result builder @Array<(Int, _)>.Builder}}
1420
+
varelements7:[(String,Int)]{
1421
+
("foo",42) // expected-error {{cannot convert return expression of type '(String, Int)' to return type '[(String, Int)]'}}
1422
+
}
1423
+
1424
+
@Array<(Int,String)>.Builder
1425
+
varelements8:[(String,Int)]{ // expected-error {{cannot convert return expression of type '[(Int, String)]' to return type '[(String, Int)]'}} expected-note {{arguments to generic parameter 'Element' ('(Int, String)' and '(String, Int)') are expected to be equal}}
1426
+
("foo",42) // expected-error {{cannot convert value of type '(String, Int)' to expected argument type '(Int, String)'}}
0 commit comments