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 44
55func acceptSendable< T: Sendable > ( _: T ) { }
66
7- class NotSendable { }
7+ class NotSendable { } // expected-note 2{{class 'NotSendable' does not conform to the `Sendable` protocol}}
88
99func testSendableBuiltinConformances(
1010 i: Int , ns: NotSendable , sf: @escaping @Sendable ( ) -> Void ,
@@ -23,8 +23,11 @@ func testSendableBuiltinConformances(
2323
2424 // Complaints about missing Sendable conformances
2525 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'}}
2932 acceptSendable ( ( i, ns) ) // expected-error{{type 'NotSendable' does not conform to the 'Sendable' protocol}}
3033}
You can’t perform that action at this time.
0 commit comments