ilya.gorbunov
compareBy { it.commonProp }.thenBy { it.subtype }.thenBy { when(it) { is SubType1 -> it.subtypeProp1 ... } }