Skip to content

redundant sendable rule breaks code when a protocol has a sendable requirement #2454

@andykent

Description

@andykent

In our project we have 3 files:

struct MyModel: Equatable, Sendable { ... }
protocol MyProtocol: Sendable { ... }
extension MyModel: MyProtocol { ... }

using the redundantSendable the Sendable gets stripped from struct MyModel which results in a compilation error in the extension file:

Conformance to 'Sendable' must occur in the same source file as struct 'MyModel'; use '@unchecked Sendable' for retroactive conformance

We have had to disable this rule for now due to the compilation error..

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler bugAn issue caused by a bug in the Swift compiler

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions