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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 10942025: Convert String and List to abstract classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to tip-of-tree. Created 8 years, 3 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/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 73be75ac0bbb87bc22cd96ee2b5482db4f15e6d5..5b5aa33a25474be3498c2c55e3109406a73c6196 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -299,14 +299,17 @@ void ClassFinalizer::ResolveSuperType(const Class& cls) {
case kWeakPropertyCid:
is_error = true;
break;
- default:
+ default: {
// Special case: classes for which we don't have a known class id.
// TODO(regis): Why isn't comparing to kIntegerCid enough?
- if (Type::Handle(Type::Double()).type_class() == super_class.raw() ||
- Type::Handle(Type::IntType()).type_class() == super_class.raw()) {
+ RawClass* super_raw = super_class.raw();
+ if (Type::Handle(Type::Double()).type_class() == super_raw ||
+ Type::Handle(Type::IntType()).type_class() == super_raw ||
+ Type::Handle(Type::StringType()).type_class() == super_raw) {
is_error = true;
}
break;
+ }
}
if (is_error) {
const Script& script = Script::Handle(cls.script());
@@ -1378,7 +1381,7 @@ void ClassFinalizer::ResolveInterfaces(const Class& cls,
interface.IsNumberType() ||
interface.IsIntType() ||
interface.IsDoubleType() ||
- interface.IsStringInterface() ||
+ interface.IsStringType() ||
(interface.IsFunctionType() && !cls.IsSignatureClass()) ||
interface.IsDynamicType()) {
const Script& script = Script::Handle(cls.script());

Powered by Google App Engine
This is Rietveld 408576698