[swift-build-dev] error: ambiguous use of operator

Ankit Agarwal ankit at ankit.im
Mon Nov 28 03:59:18 CST 2016


Would you mind reducing this to a minimal package which can reproduce this
issue?

On Sat, Nov 26, 2016 at 3:46 AM, Ryan Lovelett via swift-build-dev <
swift-build-dev at swift.org> wrote:

> I've got a package that I'm working on that is running into a weird
> error. When I run `swift build` it is failing with:
>
> ```
> /private/tmp/langserver-swift/Sources/JSONRPC/Types/Request.swift:54:46:
> error: ambiguous use of operator '<|'
>         let dMethod: Decoded<String> = (json <| "method")
>                                              ^
> Argo.<|:14:13: note: found this candidate
> public func <|<A : Decodable where A == A.DecodedType>(json: Argo.JSON,
> key: String) -> Argo.Decoded<A>
>             ^
> Argo.<|:14:13: note: found this candidate
> public func <|<A : Decodable where A == A.DecodedType>(json: Argo.JSON,
> key: String) -> Argo.Decoded<A>
> ```
>
> The problem is that when I tell SwiftPM to build an Xcode project for me
> and build in Xcode then it compiles just fine. You can experience this
> behavior for yourself in this repository:
> https://github.com/RLovelett/langserver-swift
>
> Is this a bug in my Package.swift or with SwiftPM?
> _______________________________________________
> swift-build-dev mailing list
> swift-build-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-build-dev
>



-- 
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20161128/5dcbd77d/attachment.html>


More information about the swift-build-dev mailing list