Skip to content

term "non-isolated" appears in diagnostic #74749

@mattmassicotte

Description

@mattmassicotte

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 isolationbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresdiagnostics QoIBug: Diagnostics Quality of Implementationgood first issueGood for newcomersswift 6.0type checkerArea → compiler: Semantic analysis

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions