https://kotlinlang.org logo
k

kirillrakhman

01/25/2016, 12:20 PM
methods whose parameters are interfaces defined in Java, like
Action0
in RxJava's
subscribe
get synthetic overloads with functional parameters that perform SAM conversion. additionally you can use the synthetic constructor syntax
Action1 { /*code here*/ }
which also performs SAM conversion. What I think doesn't work is mixing SAM conversion with functional types since the synthetic overloads are only generated for all parameters, not for each combination of parameters.