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

[SR-4538] [SE-153] Compensate for the inconsistency of @NSCopying's behaviour #47115

Open
tkremenek opened this issue Apr 7, 2017 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@tkremenek
Copy link
Member

Previous ID SR-4538
Radar rdar://problem/21383959
Original Reporter @tkremenek
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: a17d921fd7c4fefbe3ada42983c8a199

Issue Description:

From SE-153:

"@NSCopying attribute does not work as consistently as we usually expected in Swift initializers after developers declared a property as @NSCopying."
...
"Do the compiler magic to call copy( with: ) in the initializer so that @NSCopying attribute no longer subjects to the fact that setter methods would not be invoked in initializers. Copying should always take place after a property has been declared as @NSCopying. It seems like the most direct way to maintain the @NSCopying contract without changing the underlying direct-storage model."

@tkremenek
Copy link
Member Author

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant