A potential solution could be something like `when...
# announcements
o
A potential solution could be something like
when (val x = expr()) { is Foo -> x.fooMember() }
, but that’s quite complex
m
I don't think having such construct adds a lot of value. This can be already done if extracted outside of
when
.
👍 1
o
Except for some scoping, which is pretty valuable by itself, but indeed makes this feature less likely to be implemented any time soon.
m
🤔 I always thought functions are great for scoping 😉