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

Cannot call value of non-function type '[Observable<Event>.Type]' #70

Open
DK3369 opened this issue Oct 16, 2023 · 2 comments
Open

Cannot call value of non-function type '[Observable<Event>.Type]' #70

DK3369 opened this issue Oct 16, 2023 · 2 comments

Comments

@DK3369
Copy link

DK3369 commented Oct 16, 2023

Xcode 15
M1

  • Moya/RxSwift (15.0.0):
    • Moya/Core
    • RxSwift (~> 6.0)
private func bindingsStrongify<Event, O, WeakOwner>(_ owner: WeakOwner, _ bindings: @escaping (WeakOwner, O) -> (Bindings<Event>))
    -> (O) -> (Bindings<Event>) where WeakOwner: AnyObject {
    return { [weak owner] state -> Bindings<Event> in
        guard let strongOwner = owner else {
            return Bindings(subscriptions: [], events: [Observable<Event>]())
        }
        return bindings(strongOwner, state)
    }
}
截屏2023-10-16 下午5 20 00
@iandric
Copy link

iandric commented Oct 18, 2023

This is a duplicate of issue #66.

@brandy2015
Copy link

private func bindingsStrongify<Event, O, WeakOwner>(_ owner: WeakOwner, _ bindings: https://github.com/escaping (WeakOwner, O) -> (Bindings))
-> (O) -> (Bindings) where WeakOwner: AnyObject {
return { [weak owner] state -> Bindings in
guard let strongOwner = owner else {

        return Bindings(subscriptions: [], events:  [Observable<Event>]())
    }
    return bindings(strongOwner, state)
}

}

//Add this to Fix it
public typealias Observable = RxSwift.Observable

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

3 participants