@@ -633,29 +633,33 @@ func callitVariadic<T>(_ fs: () -> T...) -> T {
633
633
}
634
634
635
635
func testSR13239_Tuple( ) -> Int {
636
- // expected-error@+1{{conflicting inferred types from call result and closure argument to generic parameter 'T' ('()' vs. 'Int')}}
637
- callitTuple ( 1 ) {
636
+ // expected-error@+2{{conflicting arguments to generic parameter 'T' ('()' vs. 'Int')}}
637
+ // expected-note@+1:3{{generic parameter 'T' inferred as 'Int' from context}}
638
+ callitTuple ( 1 ) { // expected-note@:18{{generic parameter 'T' inferred as '()' from closure return expression}}
638
639
( print ( " hello " ) , 0 )
639
640
}
640
641
}
641
642
642
643
func testSR13239( ) -> Int {
643
- // expected-error@+1{{conflicting inferred types from call result and closure argument to generic parameter 'T' ('()' vs. 'Int')}}
644
- callit {
644
+ // expected-error@+2{{conflicting arguments to generic parameter 'T' ('()' vs. 'Int')}}
645
+ // expected-note@+1:3{{generic parameter 'T' inferred as 'Int' from context}}
646
+ callit { // expected-note@:10{{generic parameter 'T' inferred as '()' from closure return expression}}
645
647
print ( " hello " )
646
648
}
647
649
}
648
650
649
651
func testSR13239_Args( ) -> Int {
650
- // expected-error@+1{{conflicting inferred types from call result and closure argument to generic parameter 'T' ('()' vs. 'Int')}}
651
- callitArgs ( 1 ) {
652
+ // expected-error@+2{{conflicting arguments to generic parameter 'T' ('()' vs. 'Int')}}
653
+ // expected-note@+1:3{{generic parameter 'T' inferred as 'Int' from context}}
654
+ callitArgs ( 1 ) { // expected-note@:17{{generic parameter 'T' inferred as '()' from closure return expression}}
652
655
print ( " hello " )
653
656
}
654
657
}
655
658
656
659
func testSR13239_ArgsFn( ) -> Int {
657
- // expected-error@+1{{conflicting inferred types from call result and closure argument to generic parameter 'T' ('()' vs. 'Int')}}
658
- callitArgsFn ( 1 ) {
660
+ // expected-error@+2{{conflicting arguments to generic parameter 'T' ('()' vs. 'Int')}}
661
+ // expected-note@+1:3{{generic parameter 'T' inferred as 'Int' from context}}
662
+ callitArgsFn ( 1 ) { // expected-note@:19{{generic parameter 'T' inferred as '()' from closure return expression}}
659
663
{ print ( " hello " ) }
660
664
}
661
665
}
@@ -675,8 +679,9 @@ func testSR13239_GenericArg() -> Int {
675
679
}
676
680
677
681
func testSR13239_Variadic( ) -> Int {
678
- // expected-error@+1{{conflicting inferred types from call result and closure argument to generic parameter 'T' ('()' vs. 'Int')}}
679
- callitVariadic ( {
682
+ // expected-error@+2{{conflicting arguments to generic parameter 'T' ('()' vs. 'Int')}}
683
+ // expected-note@+1:3{{generic parameter 'T' inferred as 'Int' from context}}
684
+ callitVariadic ( { // expected-note@:18{{generic parameter 'T' inferred as '()' from closure return expression}}
680
685
print ( " hello " )
681
686
} )
682
687
}
0 commit comments