-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.7][Sema] Propagate nonisolated attribute from wrapped property to the synthesized projectedValue property #60454
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
Conversation
…ynthesized projectedValue variable
@swift-ci please test |
Hmmm, I don't think it's correct that you can mark a wrapped property as |
Ah okay, so we should disallow marking wrapped properties as |
I thought that the reason why |
The backing property cannot be marked as |
Ah I see, I didn't realize that |
Yes, I think so!
This may be correct because actor isolation checking should ensure that the (hand written) accessors for There's probably some design discussion to be had on the forums about this topic. For example, we could allow In any case, I think we shouldn't take this change for 5.7 and we should discuss this on the forums! |
@theblixguy please revert it from main as well. |
Thank you for the explanation! It makes sense to me. I will create a forums post to discuss this further. For now, I will revert the PR on main (and close this one) and will open a new PR to disallow |
Description: We were not propagating the
nonisolated
attribute from the wrapped property to the synthesisedprojectedValue
variable, thus triggering amain actor-isolated property '$<name>' can not be referenced from a non-isolated context
error in some contexts when accessing theprojectedValue
.Risk: Low, just adding a missing attribute to a synthesised variable
Review by: @xedin
Testing: PR Testing
Original PR: #60421