我正在尝试模拟一个对象进行测试,并且我的重写返回值没有使用此错误进行编译“[String]无法转换为'C'”
这是mock的函数覆盖,你可以看到我想返回一个字符串数组:
override func list<C: MutableCollectionType where C.Index == Int>(var list: C) -> C {
return ["the dog that worried", "the malt that lay in"]
}
我已经确认数组符合MutableCollectionType
:
struct Array<T> : MutableCollectionType, Sliceable, _DestructorSafeContainer {
为什么我收到此错误?