Skip to content

[CoreGraphics] Make CGColor adopt _ExpressibleByColorLiteral. #9733

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
merged 2 commits into from
May 18, 2017

Conversation

DougGregor
Copy link
Member

The backflips here are because we cannot add initializers to imported
CF types; they would be factory initializers. Fixes
rdar://problem/32196175.

The backflips here are because we cannot add initializers to imported
CF types; they would be factory initializers. Fixes
rdar://problem/32196175.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@jrose-apple
Copy link
Contributor

Hm, that's still not sound, is it? Because there could be subclasses of CGColor that didn't implement the normal initializer?

@DougGregor
Copy link
Member Author

You can't subclass CF types.

@DougGregor DougGregor merged commit 684bddf into swiftlang:master May 18, 2017
@DougGregor DougGregor deleted the cgcolor-color-literal branch May 18, 2017 18:06
@jrose-apple
Copy link
Contributor

A mere mortal can't subclass CF types, but they can still have subclasses, and none of their initializers are inherited.

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