Avatar
omochimetaru 3/29/2018 2:40 AM
こんなの書いた public func neverHappen(file: StaticString = #file, line: UInt = #line) -> Never { fatalError("never happen", file: file, line: line) } public func neverHappen<T0>(_ arg0: T0, file: StaticString = #file, line: UInt = #line) -> Never { fatalError("never happen: arg0=\(arg0)") } 例えばこうやって使う Observable.just(()).asDriver(onErrorRecover: { neverHappen($0) }) (edited)
2:40 AM
本当はこう書きたい・・・ asDriver(onErrorRecover: neverHappen) (edited)