Swift 2 Error using mutating function in Protocol extension “Cannot use mutating member on immutable value: ‘self’ is immutable
The problem is that, in the protocol you mark the function as mutating, which you need to do if you want to use the protocol on a struct. However, the self that is passed to testFunc is immutable (it’s a reference to a instance of the class) and that is tripping up the compiler. This … Read more