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

Unified Diff: runtime/lib/double_patch.dart

Issue 85633003: Add num.parse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file for IE. Created 7 years, 1 month 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 | sdk/lib/core/int.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double_patch.dart
diff --git a/runtime/lib/double_patch.dart b/runtime/lib/double_patch.dart
index 9e2abeb4ece9d7ee80a7404bca87f8e635038d55..6a597a8b354e5a76aa0448553d50c6779a285e63 100644
--- a/runtime/lib/double_patch.dart
+++ b/runtime/lib/double_patch.dart
@@ -45,6 +45,8 @@ patch class double {
if (onError == null) throw new FormatException(str);
return onError(str);
}
+ // Parse can create a NaN that is not identical to double.NAN.
+ if (result.isNaN) return NAN;
return result;
}
}
« no previous file with comments | « no previous file | sdk/lib/core/int.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698