XCode 7.2 crashes when protocol extension implements function incorrectly

118 views Asked by At

Not sure if anyone else has run into this, but the following code will cause XCode to immediately error out with 'SourceKitService quit unexpectedly' and sometimes causes XCode to crash completely.

I ran into this scenario in my project when I had changed my default implementation of the protocol function in the extension, but forgot to change the declaration in the protocol to match.

protocol Crash{
        func crash(age: Int) ->String
    }

extension Crash{
    func crash(name: String) -> String{
        return "Test"
    }
}

class TestCrash: Crash{

}
1

There are 1 answers

0
Eric Aya On BEST ANSWER

This bug seems to have been fixed in Xcode 7.3 beta.

Xcode 7.3b just states the error in a message and doesn't crash anymore.

enter image description here