@@ -16,21 +16,21 @@ extension Int {
1616// https://github.com/swiftlang/swift/issues/74857
1717func test( i: Int ) {
1818 let _ = i . foo < Int > ( )
19- // expected-swift5-warning@-1 {{cannot explicitly specialize a generic function }}
20- // expected-swift6-error@-2 {{cannot explicitly specialize a generic function }}
19+ // expected-swift5-warning@-1 {{cannot explicitly specialize instance method 'foo()' }}
20+ // expected-swift6-error@-2 {{cannot explicitly specialize instance method 'foo()' }}
2121
2222 let _ = i . gen < Int > ( )
23- // expected-swift5-warning@-1 {{cannot explicitly specialize a generic function }}
24- // expected-swift6-error@-2 {{cannot explicitly specialize a generic function }}
23+ // expected-swift5-warning@-1 {{cannot explicitly specialize instance method 'gen()' }}
24+ // expected-swift6-error@-2 {{cannot explicitly specialize instance method 'gen()' }}
2525 // expected-error@-3 {{generic parameter 'T' could not be inferred}}
2626
2727 let _ = 0 . foo< Int> ( )
28- // expected-swift5-warning@-1 {{cannot explicitly specialize a generic function }}
29- // expected-swift6-error@-2 {{cannot explicitly specialize a generic function }}
28+ // expected-swift5-warning@-1 {{cannot explicitly specialize instance method 'foo()' }}
29+ // expected-swift6-error@-2 {{cannot explicitly specialize instance method 'foo()' }}
3030
3131 let _ = i. gen< Int>
32- // expected-swift5-warning@-1 {{cannot explicitly specialize a generic function }}
33- // expected-swift6-error@-2 {{cannot explicitly specialize a generic function }}
32+ // expected-swift5-warning@-1 {{cannot explicitly specialize instance method 'gen()' }}
33+ // expected-swift6-error@-2 {{cannot explicitly specialize instance method 'gen()' }}
3434 // expected-error@-3 {{generic parameter 'T' could not be inferred}}
3535 let _ = i. bar< Int>
3636 // expected-swift5-error@-1 {{cannot specialize non-generic type 'Int'}}
@@ -45,8 +45,8 @@ extension Bool {
4545}
4646
4747let _: ( ) -> Bool = false . foo< Int>
48- // expected-swift5-warning@-1 {{cannot explicitly specialize a generic function }}
49- // expected-swift6-error@-2 {{cannot explicitly specialize a generic function }}
48+ // expected-swift5-warning@-1 {{cannot explicitly specialize instance method 'foo()' }}
49+ // expected-swift6-error@-2 {{cannot explicitly specialize instance method 'foo()' }}
5050
5151func foo( _ x: Int) {
5252 _ = {
6262 }
6363
6464 _ = Test . init< Int> ( { ( _: Int ) -> Void in } )
65- // expected-swift5-warning@-1 {{cannot explicitly specialize a generic function }}
66- // expected-swift6-error@-2 {{cannot explicitly specialize a generic function }}
65+ // expected-swift5-warning@-1 {{cannot explicitly specialize initializer 'init(_:)' }}
66+ // expected-swift6-error@-2 {{cannot explicitly specialize initializer 'init(_:)' }}
6767}
0 commit comments