Skip to content

Swift 6.2: Unavailable Sendable conformance emits an undesired warning for types that conform to SendableMetatype #82250

Open
@groue

Description

@groue

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions