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

Unified Diff: sdk/lib/core/double.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « sdk/lib/core/corelib_sources.gypi ('k') | sdk/lib/core/errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/double.dart
diff --git a/sdk/lib/core/double.dart b/sdk/lib/core/double.dart
index a2a63e56207ea8c5a53b8c488feb91d8ddf6393a..0b3417f3232ea7af16a3bae325f33f46f6ae113a 100644
--- a/sdk/lib/core/double.dart
+++ b/sdk/lib/core/double.dart
@@ -45,9 +45,9 @@ abstract class double extends num {
* Truncating division operator.
*
* The result of the truncating division [:a ~/ b:] is equivalent to
- * [:(a / b).truncate():].
+ * [:(a / b).truncate().toInt():].
*/
- double operator ~/(num other);
+ int operator ~/(num other);
/** Negate operator. */
double operator -();
@@ -99,7 +99,11 @@ abstract class double extends num {
* Also recognizes "NaN", "Infinity" and "-Infinity" as inputs and
* returns the corresponding double value.
*
- * Throws a [FormatException] if [source] is not a valid double literal.
+ * If the [soure] is not a valid double literal, the [handleError]
+ * is called with the [source] as argument, and its return value is
+ * used instead. If no handleError is provided, a [FormatException]
+ * is thrown.
*/
- external static double parse(String source);
+ external static double parse(String source,
+ [double handleError(String source)]);
}
« no previous file with comments | « sdk/lib/core/corelib_sources.gypi ('k') | sdk/lib/core/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698