Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我Moya在我的代码中使用 pod,它的依赖项之一是Result枚举。
Moya
Result
我的代码中还有另一个Result枚举,它与这个冲突。
我如何使用Result.Result这个枚举?我收到错误 Reference to generic type 'Result' requires arguments in <...> 好像它认为它是枚举,而不是命名空间。
Result.Result
还是有其他解决方案,例如更改导入名称?
如import Result as MoyaResult.
import Result as MoyaResult
Moya 使用 Alamofire,它有自己的Result类型。Result您可以通过将其称为来消除歧义Alamofire.Result。或者,您可以Result以类似的方式将应用程序的模块名称添加到您的类型中。
Alamofire.Result