Skip to content

Conversation

@ktoso
Copy link
Contributor

@ktoso ktoso commented Oct 28, 2025

We also take the opportunity to ban 'open distributed actor' since it does not make sense; we don't ban it outright on all actors yet since it may be breaking for adopters who did write "open actor" and we did allow that... for distributed though, that would literarily crash, so we're able to ban it explicitly.

We also take the opportunity to ban 'open distributed actor' since it
does not make sense; we don't ban it outright on all actors yet since it
may be breaking for adopters who did write "open actor" and we did allow
that... for distributed though, that would literarily crash, so we're
able to ban it explicitly.
@ktoso ktoso force-pushed the wip-fix-compiler-crash-distributed-open branch from 688c61b to 020da81 Compare October 28, 2025 07:40
@ktoso
Copy link
Contributor Author

ktoso commented Oct 28, 2025

@swift-ci please smoke test

@ktoso ktoso merged commit fc168a0 into swiftlang:main Oct 28, 2025
3 checks passed
@ktoso ktoso deleted the wip-fix-compiler-crash-distributed-open branch October 28, 2025 14:30
access = AccessLevel::Public;
if (access == AccessLevel::Open) {
auto classDecl = dyn_cast<ClassDecl>(source);
if (classDecl && classDecl->isDistributedActor()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could try to extend this to isAnyActor() but I didn't want to jump the shark just yet on it, because we technically allowed (accidentally) open actor

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to clarify @ktoso – in what cases was open allowable? it seems like it's always been banned on 'bare' (non-distriburted) actor declarations. e.g.

open actor A {}

appears to have never typechecked successfully. is there some variant in which you found this to be allowed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants