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

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

Issue 23012003: Add Null class to dart:core. (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 | « sdk/lib/core/corelib_sources.gypi ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fb8d5290e62292a0c5f8b358aeb57f6a5274058f
--- /dev/null
+++ b/sdk/lib/core/null.dart
@@ -0,0 +1,26 @@
+// 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
+ */
+class Null {
+ /**
+ * Instantiating `Null` is not allowed.
+ *
+ * This factory constructor always throws.
+ */
+ factory Null() {
Lasse Reichstein Nielsen 2013/08/13 08:25:58 Should this be a private constructor, e.g., "Null.
+ throw new UnsupportedError('new Null()');
+ }
+
+ /** Returns the string `"null"`. */
+ String toString() => "null";
+}
« no previous file with comments | « sdk/lib/core/corelib_sources.gypi ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698