summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Aart Bik <ajcbik@google.com> 2016-04-25 12:51:37 -0700
committer Aart Bik <ajcbik@google.com> 2016-04-25 16:21:34 -0700
commitf417ff44d1eb111854d7a213f106912b3dd9e3d4 (patch)
treebe69b00348b8d296a5bae7dd2c17d9f9a2b8ba0e /compiler/optimizing/nodes.cc
parentdbea8b4eacb62b357bce1bc299c8442788b288a1 (diff)
Test component type for errors too.
With regression test. Rationale: Moved erroneous check in convenience method, so we put all the same logic in one place. When testing for erroneous T[], check both the array type as well at the component type T for errors (it is possible T[] is not marked erroneous even though T is eventually). BUG=28358598 Change-Id: I11339a976dc83e0493a99e6bb97f3a058ca3f796
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index fe75451ad2..6703695484 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -2218,6 +2218,7 @@ ReferenceTypeInfo ReferenceTypeInfo::Create(TypeHandle type_handle, bool is_exac
ScopedObjectAccess soa(Thread::Current());
DCHECK(IsValidHandle(type_handle));
DCHECK(!type_handle->IsErroneous());
+ DCHECK(!type_handle->IsArrayClass() || !type_handle->GetComponentType()->IsErroneous());
if (!is_exact) {
DCHECK(!type_handle->CannotBeAssignedFromOtherTypes())
<< "Callers of ReferenceTypeInfo::Create should ensure is_exact is properly computed";