mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Improving implicit closure capture diagnostic wording
This commit is contained in:
@@ -127,6 +127,7 @@ protocol Server {
|
||||
func send<Message: Codable>(message: Message) async throws -> String
|
||||
}
|
||||
actor MyServer : Server {
|
||||
// expected-note@+1{{consider making generic parameter 'Message' conform to the 'Sendable' protocol}} {{29-29=, Sendable}}
|
||||
func send<Message: Codable>(message: Message) throws -> String { "" } // expected-warning{{non-sendable type 'Message' in parameter of actor-isolated instance method 'send(message:)' satisfying non-isolated protocol requirement cannot cross actor boundary}}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user