ReactiveX / RxSwift

Reactive Programming in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

DK3369 opened this issue · comments

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)
截屏2023-10-16 下午5 20 00

The compiler is confusing the Swift.Observable type with the RxSwift.Observable type. Use: return Bindings(subscriptions: [], events: [RxSwift.Observable<Event>]()) instead.

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