Skip to content

Conversation

@jamieQ
Copy link
Contributor

@jamieQ jamieQ commented Oct 29, 2025

The combination doesn't make sense, so don't allow it.

Resolves: #85174

The combination doesn't make sense, so don't allow it.
@jamieQ
Copy link
Contributor Author

jamieQ commented Oct 29, 2025

@swift-ci please test

@ktoso
Copy link
Contributor

ktoso commented Oct 29, 2025

Heh "nonisolated actor" that's pretty hilarious

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Lgtm and thanks for including a test for distributed as well

@ktoso
Copy link
Contributor

ktoso commented Oct 29, 2025

@swift-ci please test source compatibility

@jamieQ jamieQ changed the title [Sema]: ban the use of 'nonisolated' on actor declarations [Sema]: (eventually) ban the use of 'nonisolated' on actor declarations Oct 30, 2025
@ktoso
Copy link
Contributor

ktoso commented Oct 30, 2025

I searched around some more, let's try to make it a hard error right away.

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Approved and updating it to be a hard error after all; hope we can get away with it 🤞

We've searched and can't find any usage of this in the wild, so hope we can get away with banning this outright.
@ktoso
Copy link
Contributor

ktoso commented Oct 30, 2025

@swift-ci please smoke test

@ktoso ktoso enabled auto-merge (squash) October 30, 2025 04:26
@xedin
Copy link
Contributor

xedin commented Oct 30, 2025

@swift-ci please test source compatibility

@xedin
Copy link
Contributor

xedin commented Oct 30, 2025

Just in case.

@ktoso
Copy link
Contributor

ktoso commented Oct 30, 2025

Ok yeah let's do that with the actual error mode, thanks Pavel 👍

@ktoso ktoso disabled auto-merge October 30, 2025 07:13
@jamieQ jamieQ changed the title [Sema]: (eventually) ban the use of 'nonisolated' on actor declarations [Sema]: ban the use of 'nonisolated' on actor declarations Oct 30, 2025
@jamieQ
Copy link
Contributor Author

jamieQ commented Oct 30, 2025

looks like the source compat suite had the same spurious failures as the first try

@ktoso ktoso merged commit 0d99dbd into swiftlang:main Oct 30, 2025
3 of 5 checks passed
@ktoso
Copy link
Contributor

ktoso commented Oct 30, 2025

Resolves rdar://163558599

@jamieQ jamieQ deleted the contradiction-in-terms branch October 30, 2025 21:50
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.

nonisolated should not be allowed with actor

3 participants