Minor: toString() for CompoundWeight to improve test results readability

This commit is contained in:
Pavel V. Talanov
2018-08-07 20:35:07 +02:00
parent b51c021f56
commit 51681d57c8
@@ -161,7 +161,7 @@ object CallableWeigher : LookupElementWeigher("kotlin.callableWeight") {
other
}
private class CompoundWeight(val weight1: Weight1, val receiverIndex: Int, val weight2: Weight2) : Comparable<CompoundWeight> {
private data class CompoundWeight(val weight1: Weight1, val receiverIndex: Int, val weight2: Weight2) : Comparable<CompoundWeight> {
override fun compareTo(other: CompoundWeight): Int {
if (weight1 != other.weight1) return weight1.compareTo(other.weight1)
if (receiverIndex != other.receiverIndex) return receiverIndex.compareTo(other.receiverIndex)