Cannot call value of non-function type '[Observable<Event>.Type]'
DK3369 opened this issue · comments
duncan commented
Xcode 15.0
Mac Book Pro M1
Feedbacks.swift
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)
}
}
- Moya/RxSwift (15.0.0):
- Moya/Core
- RxSwift (~> 6.0)
Daniel Tartaglia commented
The compiler is confusing the Swift.Observable type with the RxSwift.Observable type. Use: return Bindings(subscriptions: [], events: [RxSwift.Observable<Event>]())
instead.
Shai Mishali commented
Feedbacks.swift is part of the example project and not the library itself so I don't think it's very relevant. Worth fixing but not a blocker for consumers. Closing for now, thanks