@@ -633,29 +633,33 @@ func callitVariadic<T>(_ fs: () -> T...) -> T {
633633}
634634
635635func 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}}
638639 ( print ( " hello " ) , 0 )
639640 }
640641}
641642
642643func 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}}
645647 print ( " hello " )
646648 }
647649}
648650
649651func 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}}
652655 print ( " hello " )
653656 }
654657}
655658
656659func 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}}
659663 { print ( " hello " ) }
660664 }
661665}
@@ -675,8 +679,9 @@ func testSR13239_GenericArg() -> Int {
675679}
676680
677681func 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}}
680685 print ( " hello " )
681686 } )
682687}
0 commit comments