-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
actor isolationFeature → concurrency: Actor isolationFeature → concurrency: Actor isolationbugA 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 Implementationgood first issueGood for newcomersGood for newcomersswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
Description
Per #73982, the compiler seems to have standarized on using the spelling "nonisolated" in prose. However, here's an example where "non-isolated" is used.
test.swift:4:5: error: main actor-isolated var 'global' can not be mutated from a non-isolated context
1 | var global = 42
| `- note: mutation of this var is only permitted within the actor
2 |
3 | func mutate() {
| `- note: add '@MainActor' to make global function 'mutate()' part of global actor 'MainActor'
4 | global += 1
| `- error: main actor-isolated var 'global' can not be mutated from a non-isolated context
5 | }
6 |
Reproduction
var global = 42
func mutate() {
global += 1
}
Expected behavior
"nonisolated" should be used everywhere
Environment
Apple Swift version 6.0-dev (LLVM 5b37bd4c1c578e9, Swift 54898ce)
Target: arm64-apple-macosx14.0
Additional information
No response
Metadata
Metadata
Assignees
Labels
actor isolationFeature → concurrency: Actor isolationFeature → concurrency: Actor isolationbugA 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 Implementationgood first issueGood for newcomersGood for newcomersswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis