-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
actorFeature → concurrency: `actor` declarationsFeature → concurrency: `actor` declarationsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresFeature: umbrella label for concurrency language featuresdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationmissing warningBug: Missing warningBug: Missing warningprotocolFeature → type declarations: Protocol declarationsFeature → type declarations: Protocol declarationsswift 5.7
Description
Description
a protocol with actor inheritance can be annotated by @MainActor
but it is not possible in my understanding.
- example code
// this protocol can pass compilation though I can't declare actor which conform to `B`.
@MainActor
protocol B: Actor {}
Steps to reproduce
- running above example code and check xcode can compile this code.
Expected behavior
I hope swift will say error against above code.
Environment
- Swift compiler version info: swift 5.7.2
- Xcode version info: Xcode 14.2
- Deployment target: iOS 13
Metadata
Metadata
Assignees
Labels
actorFeature → concurrency: `actor` declarationsFeature → concurrency: `actor` declarationsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresFeature: umbrella label for concurrency language featuresdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationmissing warningBug: Missing warningBug: Missing warningprotocolFeature → type declarations: Protocol declarationsFeature → type declarations: Protocol declarationsswift 5.7