Index: runtime/vm/class_finalizer.cc |
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc |
index 7c2dd36b39fbd044c5fc6a60c5cb9f8204013bb5..4a102b59e4f89b262fd36dca1e8422f27dd9ac58 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(); |
hausner
2012/10/11 17:04:44
Please don't factor this out. If any of the expres
Lasse Reichstein Nielsen
2012/10/12 08:03:51
ACK, defactored.
|
+ 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()); |
@@ -1396,7 +1399,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()); |