Closed marcelkliemannel closed 1 year ago
Hi,
I would like to use destructuring declarations with the reactor.util.function.Tuple* classes. But only the destruction of a Tuple2 works, but not with Tuple3 and upwards.
reactor.util.function.Tuple*
Tuple2
Tuple3
The problem is that in the TupleExtensions.kt there are some component* methods missing. So there is, for example, a https://github.com/reactor/reactor-kotlin-extensions/blob/0adcfd6a05390d4e83847a0371696aa274affa81/src/main/kotlin/reactor/kotlin/core/util/function/TupleExtensions.kt#L44 for the third parameter of a Tuple3, but the methods for the first and second are missing:
TupleExtensions.kt
component*
operator fun <T> Tuple3<T, *, *>.component1(): T = t1 operator fun <T> Tuple3<*, T, *>.component2(): T = t2
(I could create a PR with a fix.)
Best Regards, Marcel
Sry, this is not a bug after all. I have not considered the inheritance hierarchy of the Tuple*s correctly...
Tuple*
Hi,
I would like to use destructuring declarations with the
reactor.util.function.Tuple*
classes. But only the destruction of aTuple2
works, but not withTuple3
and upwards.The problem is that in the
TupleExtensions.kt
there are somecomponent*
methods missing. So there is, for example, a https://github.com/reactor/reactor-kotlin-extensions/blob/0adcfd6a05390d4e83847a0371696aa274affa81/src/main/kotlin/reactor/kotlin/core/util/function/TupleExtensions.kt#L44 for the third parameter of aTuple3
, but the methods for the first and second are missing:(I could create a PR with a fix.)
Best Regards, Marcel