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
_ =Data<Int>() // expected-error {{missing argument for parameter #1 in call}}
357
358
_ =Data<Int>(0) // Ok
358
359
_ =Data<Int,String>(42,"") // Ok
359
-
_ =Data<Int>(42,"") // expected-error {{extra argument in call}}
360
+
_ =Data<Int>(42,"") // expected-error {{pack expansion requires that 'Int' and 'Int, String' have the same shape}}
360
361
_ =Data<Int,String>((42,""))
361
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}} {{25-26=}} {{32-33=}}
362
+
// expected-error@-1 {{initializer expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}} {{25-26=}} {{32-33=}}
362
363
_ =Data<Int,String,Float>(vals:(42,"",0))
363
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 3 separate arguments; remove extra parentheses to change tuple into separate arguments}} {{38-39=}} {{48-49=}}
364
+
// expected-error@-1 {{pack expansion requires that 'Int, String, Float' and '(Int, String, Int)' have the same shape}}
364
365
_ =Data<Int,String,Float>((vals:42,"",0))
365
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 3 separate arguments; remove extra parentheses to change tuple into separate arguments}} {{32-33=}} {{48-49=}}
366
+
// expected-error@-1 {{initializer expects 3 separate arguments; remove extra parentheses to change tuple into separate arguments}} {{32-33=}} {{48-49=}}
366
367
_ =Data<Int,String,Float>(tuple)
367
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 3 separate arguments}}
368
+
// expected-error@-1 {{initializer expects 3 separate arguments}}
368
369
_ =Data<Int,String,Float>(x:42, tuple)
369
-
// expected-error@-1 {{value pack expansion at parameter #1 expects 3 separate arguments}}
370
+
// expected-error@-1 {{pack expansion requires that 'Int, String, Float' and '(Int, String, Float)' have the same shape}}
370
371
_ =Data<Int,String,Float>(x:42, tuple, y:1,2,3)
371
-
// expected-error@-1 {{value pack expansion at parameter #1 expects 3 separate arguments}}
372
+
// expected-error@-1 {{pack expansion requires that 'Int, String, Float' and '(Int, String, Float)' have the same shape}}
// expected-error@-1 {{value pack expansion at parameter #0 expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}}
631
+
// expected-error@-1 {{pack expansion requires that 'Int, Bool' and '(Int, Bool)' have the same shape}}
632
632
633
633
S<Int,Bool>().method((5,true,6))
634
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}}
634
+
// expected-error@-1 {{pack expansion requires that 'Int, Bool' and '(Int, Bool, Int)' have the same shape}}
635
635
636
636
S<Int,Bool>().property((5,true))
637
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}}
637
+
// expected-error@-1 {{cannot pass value pack expansion to non-pack parameter of type 'repeat each T'}}
638
638
639
639
S<Int,Bool>().property((5,true,6))
640
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}}
640
+
// expected-error@-1 {{cannot pass value pack expansion to non-pack parameter of type 'repeat each T'}}
641
641
642
642
func foo<eachU>(u:repeateachU){
643
643
S<repeateachU>().property((3,4,5))
644
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 1 separate arguments; remove extra parentheses to change tuple into separate arguments}}
644
+
// expected-error@-1 {{cannot pass value pack expansion to non-pack parameter of type 'repeat each T'}}
645
645
646
646
// FIXME: The count of 'repeat each U' is not statically known, but error suggests that it is 1.
647
647
S<repeateachU>().method((3,4,5))
648
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 1 separate arguments; remove extra parentheses to change tuple into separate arguments}}
649
-
// FIXME: Bad diagnostics
650
-
// expected-error@-3 {{pack expansion requires that 'each U' and '_' have the same shape}}
651
-
// expected-error@-4 {{pack expansion requires that 'each U' and '_.RawValue' have the same shape}}
648
+
// expected-error@-1 {{pack expansion requires that 'each U' and '(Int, Int, Int)' have the same shape}}
652
649
653
650
// FIXME: The count of '(Int, Int), repeat each U' is not statically known, but error suggests that it is 2.
654
651
S<(Int,Int),repeateachU>().method((3,4))
655
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}}
656
-
// FIXME: Duplicate diagnostics
657
-
// expected-error@-3 2 {{pack expansion requires that 'each U' and '' have the same shape}}
652
+
// expected-error@-1 {{pack expansion requires that '(Int, Int), repeat each U' and '(Int, Int)' have the same shape}}
653
+
// expected-error@-2 {{pack expansion requires that '' and 'each U' have the same shape}}
658
654
659
655
// FIXME: The count of '(Int, Int), repeat each U' is not statically known, but error suggests that it is 2.
660
656
S<(Int,Int),repeateachU>().property((3,4))
661
-
// expected-error@-1 {{value pack expansion at parameter #0 expects 2 separate arguments; remove extra parentheses to change tuple into separate arguments}}
657
+
// expected-error@-1 {{cannot pass value pack expansion to non-pack parameter of type 'repeat each T'}}
0 commit comments