Hi there, I was trying to match the types of two v...
# announcements
x
Hi there, I was trying to match the types of two values simultaneously. I realized it was not doable with
when
. Is there any library dealing with this kind of problem or any idiomatic way? I tried to roll a dsl but it looked terrible:
c
I don't understand what you're trying to do... What's wrong with
Copy code
val a = ...
val b = ...
when {
  a is TypeA && b is TypeB -> ...
  else -> ...
}
x
Oh! silly me, I was only thinking about
when (...) {
forms.