阅读背景:

是否可以将Swift泛型类函数返回类型限制为同一个类或子类?

来源:互联网 

I am extending a base class (one which I do not control) in Swift. I want to provide a class function for creating an instance typed to a subclass. A generic function is required. However, an implementation like the one below does not return the expected subclass type. I am extending a base class (one which I do not




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: