Chromium Code Reviews
DescriptionFix type errors in sort().
If a comparer isn't provided, it was silently assuming the element type
implements Comparable, even though that isn't required. Fixed to add a
manual cast at each comparison.
A stricter faster approach might be to check that the type argument
itself is a type that implements Comparable, but I don't know if that's
too pessimistic, or even possible to do.
R=vsm@google.com
Committed: https://github.com/dart-lang/dev_compiler/commit/33ff9a3d4fc3fe0cf8e12513ee27d812449a2ff2
Patch Set 1 #
Total comments: 2
Patch Set 2 : Use Comparable.compare(). #
Messages
Total messages: 6 (2 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||