mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Make image literals non-optional by routing delegation of non-failable
literal initializer to underlying failable initializer through implicitly-failable initializer (proper solution is covered in 22276505). <rdar://problem/20788137> Image literals should not be optional Swift SVN r31229
This commit is contained in:
@@ -203,10 +203,10 @@ public protocol _ColorLiteralConvertible {
|
||||
init(colorLiteralRed: Float, green: Float, blue: Float, alpha: Float)
|
||||
}
|
||||
|
||||
/// Optionals of conforming types can be initialized with image literals (e.g.
|
||||
/// Conforming types can be initialized with image literals (e.g.
|
||||
/// `[#Image(imageLiteral: "hi.png")#]`).
|
||||
public protocol _ImageLiteralConvertible {
|
||||
init?(imageLiteral: String)
|
||||
init(imageLiteral: String)
|
||||
}
|
||||
#endif // SWIFT_ENABLE_OBJECT_LITERALS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user