case
inline fun <T : Any, S : Any> KProperty1<T, S>.case(block: CaseWhenBuilder<T>.() -> Unit): CaseWhen<T>(source)
CASE WHEN expression rooted at a sealed parent property (e.g. MyEntity::status). The variant discriminator is read from <parentPath>[0]; payload paths sit under [1].
CASE WHEN expression rooted at the entity itself when it is a sealed type (e.g. KeyValueStorage<BaseSealed>). Discriminator path is $[0], payload is under $[1].
The receiver provides the type anchor R for inference; its identity is unused at runtime.