Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: pkg/fixnum/lib/src/int32.dart

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/fixnum/lib/src/int32.dart
diff --git a/pkg/fixnum/lib/src/int32.dart b/pkg/fixnum/lib/src/int32.dart
index c7804c20623600810ad6fd7a4bc3d1a0fea719f3..02eb2139b46dc0c1d981364027b3873d97b18f10 100644
--- a/pkg/fixnum/lib/src/int32.dart
+++ b/pkg/fixnum/lib/src/int32.dart
@@ -288,7 +288,7 @@ class int32 implements intx {
return _i == _convert(other);
}
- int compareTo(other) {
+ int compareTo(Comparable other) {
if (other is int64) {
return this.toInt64().compareTo(other);
}
@@ -338,7 +338,7 @@ class int32 implements intx {
int numberOfTrailingZeros() => _numberOfTrailingZeros(_i);
List<int> toBytes() {
- List<int> result = new List<int>.fixedLength(4);
+ List<int> result = new List<int>(4);
result[0] = _i & 0xff;
result[1] = (_i >> 8) & 0xff;
result[2] = (_i >> 16) & 0xff;

Powered by Google App Engine
This is Rietveld 408576698