mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
PrintAst: Tie-break multiple class members created at the same source location
Otherwise Kotlin introducing a getter, setter and field declaration based on the same property tied in the sort order, and so could be output in different orders on different machines.
This commit is contained in:
@@ -534,10 +534,12 @@ final class ClassInterfaceNode extends ElementNode {
|
||||
or
|
||||
childIndex >= 0 and
|
||||
result.(ElementNode).getElement() =
|
||||
rank[childIndex](Element e, string file, int line, int column |
|
||||
e = this.getADeclaration() and locationSortKeys(e, file, line, column)
|
||||
rank[childIndex](Element e, string file, int line, int column, string childStr |
|
||||
e = this.getADeclaration() and
|
||||
locationSortKeys(e, file, line, column) and
|
||||
childStr = result.toString()
|
||||
|
|
||||
e order by file, line, column
|
||||
e order by file, line, column, childStr
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user