Swift 2: Force-unwrap failable initializer when chaining to it from convenience initializer

Xcode 7 beta 5 is out and there is nice addition to Swift. It is more about Xcode 7 beta 5 compiler, but still it is available in Swift 2.

When your class/struct has failable initializer and you wanted to have some convenience initializer which was non-failable you were not able to simply force-unwrap the failable one. With new Xcode release you can just do it.

class Person {

    let fullName: String

    init?(fullName: String?) {
        self.fullName = fullName ?? ""
        if fullName == nil { return nil }

    convenience init(firstName: String) {
        // Before: Cannot force unwrap value of non-optional type '()'
        self.init(fullName: firstName + " (No Surname)")!

Like it!