Chromium Code Reviews| 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"; |
| + } |
| } |