@Wahib I don't think you can use pattern matching quite like that in Kotlin. It doesn't do destructuring that way. so you can pattern match on the Pair constructor but not the values inside it that way.
w
Wahib
06/27/2018, 12:31 AM
yeah seems like it even though it would be super nice to see it.
j
jacob
06/27/2018, 4:01 AM
I believe it was considered and discussed, but was too difficult to find an API they liked. When it lands in Java properly it might be revisited http://openjdk.java.net/jeps/305