(Using the sealed class from the previous message)...
# announcements
d
(Using the sealed class from the previous message) Is there a reason IDE doesn't suggest eliminating
when
altogether in this case?
Copy code
val x: A = A.X(0)
when (x) {
    else -> 1
}
Are this kind of questions appropriate for this channel? What's a better match? #C0B8MA7FA?
n
so long as you're using Slack threads and not dumping page-long code snippets in the channel I don't think people will complain
🆗 1
and I dunno, maybe there's just not an intent for that. should be similar to
if (false)
and
if (true)
intents that IntelliJ has
e
if you look at the channel browser, there's #C0B8H786P
🙏 1
it's pretty quiet though. in any case, you can file an issue on https://youtrack.jetbrains.com/ for this missing inspection
d
Got it. I just though if there was something I didn't know about
when
preventing IDE from eliminating it.