0

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{

}
Villarrealized
  • 867
  • 1
  • 6
  • 13
  • i experienced the same, I don't have an answer ... but the best workaround is don't declare the function in protocol if defined in extension because such a declaration is redundant. it seems to be a bug, the compiler should complain, that TestCrash doesn't conform to protocol Crash, because func crash(age: Int) ->String is not implemented. – user3441734 Feb 16 '16 at 08:42
  • Thanks for the info, didn't realize that the declaration in the protocol was redundant. – Villarrealized Feb 17 '16 at 01:23

1 Answers1

1

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

Eric Aya
  • 69,473
  • 35
  • 181
  • 253