swiftyuserdefaults

Ambiguous type name error

筅森魡賤 提交于 2019-12-04 03:47:48
问题 I'm trying to re-compile SwiftyUserDefaults(https://github.com/radex/SwiftyUserDefaults) to add Carthage support, but on attempt to compile I see following error: Ambiguous type name 'Proxy' in 'NSUserDefaults' for following code public func ?= (proxy: NSUserDefaults.Proxy, @autoclosure expr: () -> Any) { if !proxy.defaults.hasKey(proxy.key) { proxy.defaults[proxy.key] = expr() } } and 'Proxy' is ambiguous for type lookup in this context for public subscript(key: String) -> Proxy { return

Ambiguous type name error

倾然丶 夕夏残阳落幕 提交于 2019-12-01 19:36:07
I'm trying to re-compile SwiftyUserDefaults( https://github.com/radex/SwiftyUserDefaults ) to add Carthage support, but on attempt to compile I see following error: Ambiguous type name 'Proxy' in 'NSUserDefaults' for following code public func ?= (proxy: NSUserDefaults.Proxy, @autoclosure expr: () -> Any) { if !proxy.defaults.hasKey(proxy.key) { proxy.defaults[proxy.key] = expr() } } and 'Proxy' is ambiguous for type lookup in this context for public subscript(key: String) -> Proxy { return Proxy(self, key) } As I understand - problem is with class Proxy, that's embedded in extension. public