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

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

Issue 23087004: Improve DartDocs for dart:core classes that may not be extended or implemented. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | sdk/lib/core/double.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/bool.dart
diff --git a/sdk/lib/core/bool.dart b/sdk/lib/core/bool.dart
index 2c5da008212685fadf55dd662b3ccb3a09f82579..18b6cb408a10e73f4902aeb006833efb390fec6c 100644
--- a/sdk/lib/core/bool.dart
+++ b/sdk/lib/core/bool.dart
@@ -4,9 +4,24 @@
part of dart.core;
+/**
+ * The reserved words [:true:] and [:false:] denote objects that are the only
+ * instances of this class.
+ *
+ * It is a compile-time error for a class to attempt to extend or implement
+ * bool.
+ */
class bool {
factory bool._uninstantiable() {
throw new UnsupportedError(
"class bool cannot be instantiated");
}
+
+ /**
+ * Returns [:"true":] if the receiver is [:true:], or [:"false":] if the
ahe 2013/08/15 20:02:54 I'm not sure I like adding this method. dart2js on
rmacnak 2013/08/15 20:14:11 What if I declare it to be abstract, like on int/d
ahe 2013/08/15 20:15:54 Works for me!
+ * receiver is [:false:].
+ */
+ String toString() {
+ return this ? "true" : "false";
+ }
}
« no previous file with comments | « no previous file | sdk/lib/core/double.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698