Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Bond 7.0.0 : Ambiguous reference to member 'bind(to:)' #580

Closed
npvisual opened this issue Jan 22, 2019 · 4 comments
Closed

Upgrade to Bond 7.0.0 : Ambiguous reference to member 'bind(to:)' #580

npvisual opened this issue Jan 22, 2019 · 4 comments
Assignees

Comments

@npvisual
Copy link
Contributor

Context

Bond "7.0.0"
ReactiveKit "v3.9.7"
Differ "1.3.0"

Problem Description

Before I upgraded to Bond 7.0.0 I was able to bind a simple Signal<[Int], NoError> to a MutableObservableArray of the same type (Int is just used here as an example).

After addressing all the other migration issues, this is the only one I have left which I can't seem to be able to resolve. The compiler complains about :

Ambiguous reference to member 'bind(to:)'

1. Found this candidate (ReactiveKit.SignalProtocol)
2. Found this candidate (ReactiveKit.SignalProtocol)

For example :

    public let testProp : Property<[Int]> = Property([0])
    public let testArray : MutableObservableArray<Int> = MutableObservableArray([])
...
        testProp
            .toSignal()
            .bind(to: testArray)

will trigger that complaint from the compiler, whereas it didn't use to with previous version of Bond.

Any ideas on how to fix this ?

Thanks !

@srdanrasic
Copy link
Contributor

Looks like this is something I missed. I'll implement support. In the mean time you should be able to do:

testProp
    .map { OrderedCollectionChangeset(collection: $0, patch: []) }
    .bind(to: testArray)

@npvisual
Copy link
Contributor Author

Tested your suggestion, seems to work fine. So I'll use that in the meantime. Thanks !

@srdanrasic srdanrasic self-assigned this Feb 17, 2019
@srdanrasic
Copy link
Contributor

Implemented in 7.2.0.

@npvisual
Copy link
Contributor Author

Works great in 7.2.0. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants