How to refer to a global type from within a class that has a nested type with the same name?
- 阅读更多 关于 How to refer to a global type from within a class that has a nested type with the same name?
问题 I have a class declared at the global scope and another class with the same name that is nested within some class. class Address { var someProperty: String? } class ThirdPartyAPI { class Address { var someOtherProperty: String? init(fromAddress address: Address) { self.someOtherProperty = address.someProperty } } } The question is: how can I refer to a global class instead of the inner one from its initialiser? In the example given I've got an error Value of type 'ThirdPartyAPI.Address' has