Commit Graph

6 Commits

Author SHA1 Message Date
Konrad 'ktoso' Malawski
03774d245a fix some tests due to diagnostic rewording 2025-07-15 11:16:13 +09:00
Konrad 'ktoso' Malawski
f52f445358 [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
2025-07-15 10:42:25 +09:00
Kavon Farvardin
3ab4c7548c Sema: ban extensions of known marker protocols
There's no good reason to permit them. Conformances like Copyable and
Sendable are pervasive, so it's as though we are permitting extensions
of `Any`. Until there's a good argument in favor of such extensions,
remove the capability now.
2024-02-07 14:54:36 -08:00
Pavel Yaskevich
ad87a5c582 [Concurrency] Downgrade error about inherited Sendable classes inheriting from non-NSObject to warning 2023-11-16 13:40:44 -08:00
Pavel Yaskevich
e6a6ecf44b [NameLookup] Lift synthesized protocol check into getDirectlyInheritedNominalTypeDecls
Some places use `getDirectlyInheritedNominalTypeDecls` directly
instead of fetching it through a request, so lift the check there
instead (direct use of `getDirectlyInheritedNominalTypeDecls`
could be refactored separately).
2023-11-16 10:58:34 -08:00
Pavel Yaskevich
e050e35c36 [AST] Teach InheritedProtocolsRequest about synthesized protocol attributes
ClangImporter converts NS_SWIFT_SENDABLE into `SynthesizedProtocolAttr`
which needs to be recognized by the request that collects all of the
protocols that the given protocol inherits.
2023-11-16 10:58:34 -08:00