// FIR_IDENTICAL import java.util.* import kotlin.comparisons.compareBy import kotlin.comparisons.nullsLast class Foo(val a: String, val b: Int) fun getComp(): Comparator = when { else -> nullsLast(compareBy({ it.a }, { it.b })) } fun getCompInverted(): Comparator = nullsLast( when { else -> compareBy({ it.a }, { it.b }) } )