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

Unified Diff: runtime/lib/null_patch.dart

Issue 22819005: Make Null a public class of dart:core. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: vm only, rebase 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
Index: runtime/lib/null_patch.dart
diff --git a/runtime/lib/mirror_reference.dart b/runtime/lib/null_patch.dart
similarity index 50%
copy from runtime/lib/mirror_reference.dart
copy to runtime/lib/null_patch.dart
index b0f7726d7fbeb8548a4a2ee8aa9a24e3e1834e19..07eb99f0280d7efc78577de0d8dde8412b883212 100644
--- a/runtime/lib/mirror_reference.dart
+++ b/runtime/lib/null_patch.dart
@@ -2,11 +2,20 @@
// 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.
-class _MirrorReference {
- factory _MirrorReference._uninstantiable() {
+// Dart core library.
+
+class Null {
+
+ factory Null._uninstantiable() {
throw new UnsupportedError(
- "class _MirrorReference cannot be instantiated");
+ "class Null cannot be instantiated");
}
- bool operator ==(other) native "MirrorReference_equals";
+ int get hashCode {
+ return 2011; // The year Dart was announced and a prime.
+ }
+
+ String toString() {
+ return 'null';
+ }
}

Powered by Google App Engine
This is Rietveld 408576698