【发布时间】:2020-07-01 09:16:53
【问题描述】:
我在引用来自 3rd 方模块的符号时遇到问题,我的代码如下所示:
import Foo // 3rd party module
struct Foo { // my type on my module
//...
}
struct Bar: Foo.ProtocolA { // here swift referes to my struct instead of the module
}
我不能只使用: ProtocolA,因为该名称已在我的模块中使用。
有没有办法消除歧义?
我见过类似的问题,但它们解决了不同的问题,消除了模块类型而不是自己的类型的歧义。
TIA
【问题讨论】:
-
这能回答你的问题吗? Swift's standard library and name collision
-
不幸的是它没有。我已经更新了我的问题以使其更清楚,谢谢
标签: swift