File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
test/decl/protocol/special Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
func acceptSendable< T: Sendable > ( _: T ) { }
6
6
7
- class NotSendable { }
7
+ class NotSendable { } // expected-note 2{{class 'NotSendable' does not conform to the `Sendable` protocol}}
8
8
9
9
func testSendableBuiltinConformances(
10
10
i: Int , ns: NotSendable , sf: @escaping @Sendable ( ) -> Void ,
@@ -23,8 +23,11 @@ func testSendableBuiltinConformances(
23
23
24
24
// Complaints about missing Sendable conformances
25
25
acceptSendable ( ( i, ns) ) // expected-error{{type 'NotSendable' does not conform to the 'Sendable' protocol}}
26
- acceptSendable ( nsf) // expected-error{{function type '() -> Void' must be marked '@Sendable' to conform to 'Sendable'}}
27
- acceptSendable ( ( nsf, i) ) // expected-error{{function type '() -> Void' must be marked '@Sendable' to conform to 'Sendable'}}
28
- acceptSendable ( funNotSendable) // expected-error{{function type '() -> Void' must be marked '@Sendable' to conform to 'Sendable'}}
26
+ acceptSendable ( nsf) // expected-error{{type '() -> Void' does not conform to the 'Sendable' protocol}}
27
+ // expected-note@-1{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
28
+ acceptSendable ( ( nsf, i) ) // expected-error{{type '() -> Void' does not conform to the 'Sendable' protocol}}
29
+ // expected-note@-1{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
30
+ acceptSendable ( funNotSendable) // expected-error{{type '() -> Void' does not conform to the 'Sendable' protocol}}
31
+ // expected-note@-1{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
29
32
acceptSendable ( ( i, ns) ) // expected-error{{type 'NotSendable' does not conform to the 'Sendable' protocol}}
30
33
}
You can’t perform that action at this time.
0 commit comments