v79
09/22/2023, 5:30 PMis
cases in a when
block over a sealed class? I was hoping for when(sqsMessageBody) { is SqsMsgBody.Page, <http://SqsMsgBody.Post|SqsMsgBody.Post> -> { ... } }
but IntelliJ complains that they are incompatible types. I understand why, but in my case the differences between Page and Post are irrelevant here. I'm actually just trying to avoid a catch-all else ->
clause...ephemient
09/22/2023, 5:33 PMis SqsMsgBody.Page, is <http://SqsMsgBody.Post|SqsMsgBody.Post> ->
(with the extra is
)?sqsMessageBody
with the <http://SqsMsgBody.Post|SqsMsgBody.Post>
companion object, assuming it's not an object to begin withv79
09/22/2023, 5:51 PM