I'm rewriting some java class in kotlin and stuck ...
# announcements
d
I'm rewriting some java class in kotlin and stuck at one place. Type inference failed for return type of this method: https://github.com/ReactiveX/RxJava/blob/1.x/src/main/java/rx/functions/Actions.java#L32 This code works in Java:
Copy code
new ActionSubscriber(onNext, onError, Actions.empty());
but it doesn't work in Kotlin:
Copy code
ActionSubscriber(onNext, onError, Actions.empty())
It cannot infer the type of
T0
which is actually
Action0
and doesn't work even if I specify it explicitly. Any solutions/workarounds?