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

Unified Diff: lib/fixnum/int64.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 | « lib/fixnum/int32.dart ('k') | lib/protobuf/plugin/CodeGenerator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/fixnum/int64.dart
diff --git a/lib/fixnum/int64.dart b/lib/fixnum/int64.dart
index 8cefb32f502d89cd7af0afc53ceea3961e38c0a7..733955e092abfc869bf11f690ed15b36547bb0b1 100644
--- a/lib/fixnum/int64.dart
+++ b/lib/fixnum/int64.dart
@@ -243,8 +243,8 @@ class int64 implements intx {
throw new NullPointerException();
} else if (other is intx) {
other = other.toInt64();
- } else if (other is int) {
- other = new int64.fromInt(other);
+ } else if (other is num) {
+ other = new int64.fromInt(other.toInt());
}
if (other is !int64) {
throw new Exception("Can't promote $other to int64");
« no previous file with comments | « lib/fixnum/int32.dart ('k') | lib/protobuf/plugin/CodeGenerator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698