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-6695] methods/computed properties defined in Swift not seen by Objective-C runtime in Swift 4.0 #49244

Closed
swift-ci opened this issue Jan 4, 2018 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 4, 2018

Previous ID SR-6695
Radar None
Original Reporter Nicolas Buquet (JIRA User)
Type Bug
Status Resolved
Resolution Invalid
Environment

Xcode 9.2

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: b27261015ab7ffbd296a40b00cfde702

Issue Description:

Example:

In Objective-C file:

NSLog(@"UIColor respondsToSelector 'red': %@", [UIColor respondsToSelector:@selector(red)] ? @"YES" : @"NO");

prints YES when the project is compiled for Swift 3.2

prints NO when the project is compiled for Swift 4.0

@belkadan
Copy link
Contributor

belkadan commented Jan 5, 2018

That's correct. See SE-0160 for a description of why this behavior was changed. (We never meant to be adding Objective-C methods to UIColor, but you can add them back if you really want them.)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants