Apply consistent sorting for elements from the same position
There could be multiple elements originating from the same position in the source file, so make sure to use name+desc to sort those.
This commit is contained in:
committed by
Yan Zhulanow
parent
ad8517c19a
commit
3b2986f069
+3
-1
@@ -462,7 +462,9 @@ class ClassFileToSourceStubConverter(val kaptContext: KaptContextForStubGenerati
|
|||||||
|
|
||||||
return if (position1 != null && position1.path == classSource.path) {
|
return if (position1 != null && position1.path == classSource.path) {
|
||||||
if (position2 != null && position2.path == classSource.path) {
|
if (position2 != null && position2.path == classSource.path) {
|
||||||
position1.pos.compareTo(position2.pos)
|
val positionCompare = position1.pos.compareTo(position2.pos)
|
||||||
|
if (positionCompare != 0) positionCompare
|
||||||
|
else compareDescriptors(data1, data2)
|
||||||
} else {
|
} else {
|
||||||
-1
|
-1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user