I have a class that specifies a initialiser taking any class that implements the protocol "ChatDatastore"
I can use this fine in the functions for my test cases. However if I try to initialise it in a member either statically, lazily or even via a computed variable it shows an error stating "Instance member 'chatDatastore' cannot be used on type 'ChatSessionRowViewModelTests' Not only is this confusing its plain wrong. I am passing in a Mock which implements this protocol for the purposes of testing. This should work yet it seems to think that the initializer takes a totally different type than specified in the code. It should accept my Mock class since it implements this protocol yet it complains that I need to give it an instance of my testing class. Which makes no sense :S *___________________________________* *James⎥Head Of CEO* *ja...@supmenow.com <ja...@supmenow.com>⎥supmenow.com <http://supmenow.com>* *Sup* *Runway East * *10 Finsbury Square* *London* * EC2A 1AF *
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution