K2: Optimize one-branch when-expr case only for independent context
Using independent one where `when` is nested doesn't look correct
This commit is contained in:
committed by
Space Team
parent
04d3996e68
commit
8f8ea8c57f
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
import java.util.*
|
||||
import kotlin.comparisons.compareBy
|
||||
import kotlin.comparisons.nullsLast
|
||||
@@ -14,4 +15,4 @@ fun getCompInverted(): Comparator<Foo?> =
|
||||
when {
|
||||
else -> compareBy({ it.a }, { it.b })
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user