-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed as not planned
Closed as not planned
Copy link
Labels
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 Implementationimprovementtype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
Description
Everywhere I can find, hyphenation is used both in documentation and diagnostics for isolation. "actor-isolated", "task-isolated". But in this example, the warning uses "nonisolated".
14 |
15 | await updateUI(with: style)
| |- error: sending 'style' risks causing data races
| `- note: sending 'style' to main actor-isolated global function 'updateUI(with:)' risks causing data races between main actor-isolated and local nonisolated uses
16 |
17 | style.store()
| `- note: access can happen concurrently
18 | }
19 |
Reproduction
// Non-Sendable reference type
class Style {
func store() {
}
}
@MainActor
func updateUI(with style: Style) {
}
// a non-isolated use
func refresh() async {
let style = Style()
await updateUI(with: style)
style.store()
}
Expected behavior
I would expect this to use "non-isolated:
note: sending 'style' to main actor-isolated global function 'updateUI(with:)' risks causing data races between main actor-isolated and local non-isolated uses
Environment
Apple Swift version 6.0-dev (LLVM 4b0b1f9e1a69523, Swift 91a3abc)
Target: arm64-apple-macosx14.0
Additional information
No response
Metadata
Metadata
Assignees
Labels
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 Implementationimprovementtype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis