Avoid constructing types with errors.
BUG=27626735
Rationale:
Do not construct classes with a link error. Without this,
the error type thought it was Object (mirror's method
IsObjectClass() returns true if there is no superclass).
Change-Id: I55ca8cc8cfc042210edf748aab10da4c6e345980
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 1afa36a..af5ef04 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -2190,6 +2190,7 @@
if (kIsDebugBuild) {
ScopedObjectAccess soa(Thread::Current());
DCHECK(IsValidHandle(type_handle));
+ DCHECK(!type_handle->IsErroneous());
if (!is_exact) {
DCHECK(!type_handle->CannotBeAssignedFromOtherTypes())
<< "Callers of ReferenceTypeInfo::Create should ensure is_exact is properly computed";