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

Unified Diff: sdk/lib/_internal/pub/lib/src/version.dart

Issue 23702061: Fix warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 3 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: sdk/lib/_internal/pub/lib/src/version.dart
diff --git a/sdk/lib/_internal/pub/lib/src/version.dart b/sdk/lib/_internal/pub/lib/src/version.dart
index 0d25c735e0767b08201397d6e867e3f03dcfa8ca..969d268039b972fece4d1b6d858d46f3203bb7ca 100644
--- a/sdk/lib/_internal/pub/lib/src/version.dart
+++ b/sdk/lib/_internal/pub/lib/src/version.dart
@@ -172,8 +172,8 @@ class Version implements Comparable<Version>, VersionConstraint {
if (aPart == null) return -1;
if (bPart == null) return 1;
- if (aPart is int) {
- if (bPart is int) {
+ if (aPart is num) {
+ if (bPart is num) {
// Compare two numbers.
return aPart.compareTo(bPart);
} else {
@@ -181,7 +181,7 @@ class Version implements Comparable<Version>, VersionConstraint {
return -1;
}
} else {
- if (bPart is int) {
+ if (bPart is num) {
// Strings come after numbers.
return 1;
} else {
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | sdk/lib/_internal/pub/test/hosted/version_negotiation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698