[swift-build-dev] error: ambiguous use of operator
Ryan Lovelett
swift-dev at ryan.lovelett.me
Tue Nov 29 14:04:46 CST 2016
Sure thing! I actually found someone who was running into a variation on
the same theme. So I'll actually just include their minimal code.
https://github.com/thoughtbot/Argo/pull/432
https://travis-ci.org/ikesyo/Argo/builds/174070096
https://github.com/ikesyo/Argo/tree/829a727861e55eeb454b2c53c5793764f2cdc765/SwiftPMDemo
The attached example.tar.xz file contains all the source in the above
example. It exhibits the same behavior. If you run `swift build` it
fails. If you run `swift package generate-xcodeproj` and build in Xcode
it compiles just fine.
On Mon, Nov 28, 2016, at 04:59 AM, Ankit Agarwal wrote:
> 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/20161129/8fa1d916/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tar.xz
Type: application/x-xz
Size: 648 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20161129/8fa1d916/attachment.xz>
More information about the swift-build-dev
mailing list