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

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: Fixed IsNullType. All tests succeede for VM now. 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/flow_graph_builder.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 f10b5bbbbf59096f375c2803c3e0ec146eef9ffa..c0db417c703b45d3c355220ef6b47a95771af2fe 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -1903,6 +1903,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:
@@ -1972,11 +1973,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/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698