-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidactorFeature → concurrency: `actor` declarationsFeature → concurrency: `actor` declarationsactor isolationFeature → concurrency: Actor isolationFeature → concurrency: Actor isolationcompilerThe Swift compiler itselfThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresFeature: umbrella label for concurrency language featurestype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
Description
nonisolated keyword seems to serve no purpose next to actor. By nature, they are contradictory and there is no clear indication of how it will behave.
This was behaving correctly (with a compilation error) in 6.03 example, but started compiling from 6.1.
Reproduction
nonisolated actor Counter {
var counter = 0
func increment() {
counter += 1
}
}Expected behavior
nonisolated actor MyActor {} Should produce a compilation error.
Environment
swiftc 6.1+
Additional information
No response
Metadata
Metadata
Assignees
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidactorFeature → concurrency: `actor` declarationsFeature → concurrency: `actor` declarationsactor isolationFeature → concurrency: Actor isolationFeature → concurrency: Actor isolationcompilerThe Swift compiler itselfThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresFeature: umbrella label for concurrency language featurestype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis