I've spent some time today trying to figure out wh...
# intellij
r
I've spent some time today trying to figure out what was happening here. Finally got it. It turns out that `object`s behave a bit different that I thought they were. After deserializing an
object
, a totally new instance is created. This produces
NoWhenBranchMatchedException
when comparing with and old instance of
object
. See provided code for an example. Maybe IDE should warn developer that using when branch without
is
might be dangerous?