So, I created a new Xcode project and wrote this Podfile:
use_frameworks!
target 'Repro' do
pod 'Alamofire'
pod 'Result'
end
Then I started pod install, opened the workspace and created a new file with the following contents:
import Alamofire
import Result
private func something(request: Request) -> Result<Bool, NSError> {
fatalError()
}
And I tried to build this, but Xcode created an error 'Result' is ambiguous for type lookup in this context. So I tried to make an obvious fix:
import Alamofire
import Result
private func something(request: Request) -> Result.Result<Bool, NSError> {
fatalError()
}
But this gave me an error Reference to generic type 'Result' requires arguments in <...>, as if Swift parsed the module name as a type name.
What is a non-obvious fix?
source
share