Commits

Devin Coughlin committed 9dc0c8a173d
Importer: Prefer more available convenience factory initializers over less available convenience initializers Update the importer and name lookup to prefer a factory initializer that is more available over a convenience initializer that is less available even though we generally prefer convenience initializers over convenience factory initializers. The motivation for this change is CIColor, which has added a new convenience initializer: - (instancetype)initWithRed:(CGFloat)r green:(CGFloat)g blue:(CGFloat)b NS_AVAILABLE(10_11, 9_0); but already has existing convenience factory initializer: + (instancetype)colorWithRed:(CGFloat)r green:(CGFloat)g blue:(CGFloat)b; Without this change we prefer -initWithRed:green:blue, so instantiating CIColor with: let colorChannelValue: CGFloat = … let ciColor = CIColor(red: colorChannelValue, green: colorChannelValue, blue: colorChannelValue) results in an availability error even though there is a perfectly available convenience factory initializer. With this change, we choose the convenience factory initializer when importing, so there is no availability error. rdar://problem/20617581 Swift SVN r30946