Chromium Code Reviews| Index: sdk/lib/core/null.dart |
| diff --git a/sdk/lib/core/null.dart b/sdk/lib/core/null.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6ba52abd8637bd73f9afd26a4b053b5d034deb30 |
| --- /dev/null |
| +++ b/sdk/lib/core/null.dart |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +part of dart.core; |
| + |
| +/** |
| + * Class of the `null` value. |
| + * |
| + * The only instance of the [Null] class is the `null` object. |
| + * |
| + * Extending or implementing `Null` is not allowed, and the |
|
Søren Gjesse
2013/08/13 14:53:52
Comment cut short.
rmacnak
2013/08/14 01:23:13
"It is a compile-time error for a class to attempt
Lasse Reichstein Nielsen
2013/08/14 08:18:35
Done.
|
| + */ |
| +class Null { |
| + /** |
|
Søren Gjesse
2013/08/13 14:53:52
Will this dartdoc ever end up in the documentation
Lasse Reichstein Nielsen
2013/08/14 08:18:35
Probably, but not displayed by default.
I'll copy
|
| + * Instantiating `Null` is not allowed. |
| + * |
| + * This constructor is only here to prevent the automatic |
| + * generation of a default constructor. |
| + */ |
| + factory Null._() { |
|
rmacnak
2013/08/14 01:23:13
Please mimic the factory in bool.
Lasse Reichstein Nielsen
2013/08/14 08:18:35
Done.
|
| + throw new UnsupportedError('new Null()'); |
| + } |
| + |
| + /** Returns the string `"null"`. */ |
| + String toString() => "null"; |
| +} |