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-7025] 'class' in protocols should be deprecated as per SE-156 #49573

Open
hartbit opened this issue Feb 18, 2018 · 1 comment
Open

[SR-7025] 'class' in protocols should be deprecated as per SE-156 #49573

hartbit opened this issue Feb 18, 2018 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@hartbit
Copy link
Collaborator

hartbit commented Feb 18, 2018

Previous ID SR-7025
Radar None
Original Reporter @hartbit
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 10889c2a5a29c8ee6648dd5561fb309b

Issue Description:

I noticed the other day that the class keyword is not deprecated as defined in the following paragraph of SE-156:

This proposal merges the concepts of class and AnyObject, which now have the same meaning: they represent an existential for classes. To get rid of the duplication, we suggest only keeping AnyObject around. To reduce source-breakage to a minimum, class could be redefined as typealias class = AnyObject and give a deprecation warning on class for the first version of Swift this proposal is implemented in. Later, class could be removed in a subsequent version of Swift.

Is there a reason this has not been done, or was it just forgotten?

@belkadan
Copy link
Contributor

I'm not sure. I suspect it was a compatibility thing, that we wanted to deprecate it only in Swift 4 mode, and then didn't get around to it. Maybe @slavapestov will remember when he gets back from leave.

@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

2 participants