Open
Description
Description
It should be possible to conform to SendableMetatype
via a protocol, and prevent Sendable
conformance, without compiler warning.
Reproduction
protocol MyProtocol: SendableMetatype { }
class MyClass: MyProtocol { }
// Warning: Redundant conformance of 'MyClass' to protocol 'SendableMetatype'
@available(*, unavailable)
extension MyClass: Sendable { }
Expected behavior
protocol MyProtocol: SendableMetatype { }
class MyClass: MyProtocol { }
// No warning
@available(*, unavailable)
extension MyClass: Sendable { }
Environment
Swift 6.2, Xcode Version 26.0 beta (17A5241e)
Additional information
This code does not emit any warning, so it looks like the protocol is needed for the bug to express itself.
class MyClass: SendableMetatype { }
// No warning
@available(*, unavailable)
extension MyClass: Sendable { }