Skip to content

[move-only] Fix emission of addressonly noncopyable setter new values. #66084

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

Merged

Conversation

gottesmm
Copy link
Contributor

NOTE: This does not affect normal parameters since normal parameters that are noncopyable never have default access semantics since the user is forced to specify either borrow or consume. This is incontrast to implicit parameters like the newValue of a setter.

rdar://109726282

NOTE: This does not affect normal parameters since normal parameters that are
noncopyable never have default access semantics since the user is forced to
specify either borrow or consume. This is incontrast to implicit parameters like
the newValue of a setter.

rdar://109726282
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@jckarter
Copy link
Contributor

Would it be simpler then to construct the AST of setters so that their newValue is always explicitly marked __owned?

@gottesmm
Copy link
Contributor Author

@jckarter I was looking at that and I got worried about playing whackamole

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

That said, I think this is a reasonable spot fix. We can try to update the AST and investigate the fallout from that separately.

@gottesmm gottesmm merged commit 767fdfc into swiftlang:main May 23, 2023
@gottesmm gottesmm deleted the pr-295915eed5caee4c789ab3a532ffac4379ba1778 branch May 23, 2023 20:41
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