Unverified Commit 39554279 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Make compareTo more robust in semantics.dart (#81083)

parent b0a63c4f
......@@ -2353,7 +2353,7 @@ class _BoxEdge implements Comparable<_BoxEdge> {
@override
int compareTo(_BoxEdge other) {
return (offset - other.offset).sign.toInt();
return offset.compareTo(other.offset);
}
}
......@@ -2381,7 +2381,7 @@ class _SemanticsSortGroup extends Comparable<_SemanticsSortGroup> {
@override
int compareTo(_SemanticsSortGroup other) {
return (startOffset - other.startOffset).sign.toInt();
return startOffset.compareTo(other.startOffset);
}
/// Sorts this group assuming that [nodes] belong to the same vertical group.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment