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

hartbit opened this issue Feb 18, 2018 · 1 comment

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

hartbit opened this issue Feb 18, 2018 · 1 comment


Copy link

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?

Copy link

belkadan commented Feb 19, 2018

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
None yet

No branches or pull requests

2 participants