Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This isolation diagnostic lacks enough context to understand easily #79077

Open
mattmassicotte opened this issue Jan 31, 2025 · 0 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. concurrency Feature: umbrella label for concurrency language features

Comments

@mattmassicotte
Copy link
Contributor

Description

Minor grammar issue aside, this diagnostic doesn't really provide enough context to fully understand which two actors are being referenced. This is better in the global-actor case.

Reproduction

actor MyActor {
	var value = 1
}

actor MyOtherActor {
	// error: Actor-isolated default value in a actor-isolated context
	let value = MyActor().value
}

Expected behavior

I think I'd like to see references either to self or to the actor types somehow? I'm not 100% sure, but as-is doesn't feel particularly ideal.

Environment

Apple Swift version 6.1-dev (LLVM a321a98f4e5b06a, Swift 7a0a6e7)
Target: arm64-apple-macosx15.0

Additional information

No response

@mattmassicotte mattmassicotte added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Jan 31, 2025
@hborla hborla added concurrency Feature: umbrella label for concurrency language features and removed triage needed This issue needs more specific labels labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. concurrency Feature: umbrella label for concurrency language features
Projects
None yet
Development

No branches or pull requests

2 participants