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

Unified Diff: lib/fixnum/int32.dart

Issue 10595002: Protocol Buffer runtime library and 'protoc' plugin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Work around http://code.google.com/p/dart/issues/detail?id=3806 Created 8 years, 6 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
« no previous file with comments | « no previous file | lib/fixnum/int64.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/fixnum/int32.dart
diff --git a/lib/fixnum/int32.dart b/lib/fixnum/int32.dart
index 8bc61f1bc5851d8ae09f42150bcdc715ccd9334e..b74468ba751a76b9eed9d40017b19e32add14b78 100644
--- a/lib/fixnum/int32.dart
+++ b/lib/fixnum/int32.dart
@@ -143,8 +143,8 @@ class int32 implements intx {
throw new NullPointerException();
} else if (other is intx) {
return other.toInt32()._i;
- } else if (other is int) {
- return other;
+ } else if (other is num) {
+ return other.toInt();
} else {
throw new Exception("Can't retrieve 32-bit int from $other");
}
« no previous file with comments | « no previous file | lib/fixnum/int64.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698