[Sema] Improving implicit closure capture diagnostic wording

This commit is contained in:
Luciano Almeida
2022-04-27 11:03:58 -03:00
parent 0ce821a731
commit d95cd97703
5 changed files with 93 additions and 26 deletions

View File

@@ -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}}
}