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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 23012003: Add Null class to dart:core. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Marked test failing due to new dart2js mirror bug. 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 | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index f59a0481658d7916a132a709695778b929f3847a..8292928b130115bbd4a6623ccdf76da3059de1bd 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -1927,6 +1927,7 @@ void ClassFinalizer::ResolveSuperTypeAndInterfaces(
// Prevent extending core implementation classes.
bool is_error = false;
switch (interface_class.id()) {
+ case kNullCid:
case kNumberCid:
case kIntegerCid: // Class Integer, not int.
case kSmiCid:
@@ -1996,11 +1997,12 @@ void ClassFinalizer::ResolveSuperTypeAndInterfaces(
String::Handle(interface_class.Name()).ToCString());
}
// Verify that unless cls belongs to core lib, it cannot extend or implement
- // any of bool, num, int, double, String, Function, dynamic.
+ // any of Null, bool, num, int, double, String, Function, dynamic.
// The exception is signature classes, which are compiler generated and
// represent a function type, therefore implementing the Function interface.
if (!cls_belongs_to_core_lib) {
- if (interface.IsBoolType() ||
+ if (interface.IsNullType() ||
+ interface.IsBoolType() ||
interface.IsNumberType() ||
interface.IsIntType() ||
interface.IsDoubleType() ||
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698