mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Concurrency] add fixit to add final to non-sendable class -> Sendable
The previous message was just suggesting unchecked Sendable, but instead we should be suggesting to add final to the class. We also don't outright suggest using unchecked Sendable -- following https://github.com/swiftlang/swift/pull/81738 precedent. Resolves rdar://155790695
This commit is contained in:
@@ -5954,8 +5954,7 @@ ERROR(concurrent_value_outside_source_file,none,
|
||||
"%kind0; use '@unchecked Sendable' for retroactive conformance",
|
||||
(const ValueDecl *))
|
||||
ERROR(concurrent_value_nonfinal_class,none,
|
||||
"non-final class %0 cannot conform to 'Sendable'; "
|
||||
"use '@unchecked Sendable'", (DeclName))
|
||||
"non-final class %0 can not conform to the 'Sendable' protocol", (DeclName))
|
||||
ERROR(concurrent_value_inherit,none,
|
||||
"'Sendable' class %1 cannot inherit from another class"
|
||||
"%select{| other than 'NSObject'}0",
|
||||
|
||||
Reference in New Issue
Block a user