Closed fzhinkin closed 3 months ago
I have a feeling that the sorting test doesn't specifically test sorting inside groups. For example, try replacing lhs.text.compareTo(rhs.text)
with 0
and see if there will be failures to sort declarations inside groups.
@ilya-g using a fixed value instead of lhs.text.compareTo(rhs.text)
leads to test failures (both unit- and functional-tests).
But I agree that a test explicitly covering ordering is missing, I'll add it.
Currently, all dumped declarations are sorted lexicographically, potentially by mixing different kinds of declarations. That approach differs from what we do for JVM dumps, where declarations are grouped by a declaration kind.
With this change, declarations will be ordered as follows:
This PR introduces the following order:
Closes #197