NoTests / RxFeedback.swift

The universal system operator and architecture for RxSwift
MIT License
1.04k stars 68 forks source link

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

Open DK3369 opened 1 year ago

DK3369 commented 1 year ago

Xcode 15 M1

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 commented 1 year ago

This is a duplicate of issue https://github.com/NoTests/RxFeedback.swift/issues/66.

brandy2015 commented 1 year ago

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