Fix VM test 065 and 066

Fix bug in setting the VerifyErrorClass, set this when super and
interface types are incorrect.

Change-Id: Ib779e3e5c5aaa8ae4f83a673194f27bb31b37d13
diff --git a/src/class_linker.cc b/src/class_linker.cc
index dd8fc11..88016f4 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -2183,11 +2183,13 @@
   }
   // Verify
   if (super->IsFinal() || super->IsInterface()) {
-    Thread::Current()->ThrowNewExceptionF("Ljava/lang/IncompatibleClassChangeError;",
+    Thread* thread = Thread::Current();
+    thread->ThrowNewExceptionF("Ljava/lang/IncompatibleClassChangeError;",
         "Superclass %s of %s is %s",
         PrettyDescriptor(super).c_str(),
         PrettyDescriptor(klass.get()).c_str(),
         super->IsFinal() ? "declared final" : "an interface");
+    klass->SetVerifyErrorClass(thread->GetException()->GetClass());
     return false;
   }
   if (!klass->CanAccess(super)) {
@@ -2347,10 +2349,12 @@
     DCHECK(interface != NULL);
     if (!interface->IsInterface()) {
       ClassHelper ih(interface);
-      Thread::Current()->ThrowNewExceptionF("Ljava/lang/IncompatibleClassChangeError;",
+      Thread* thread = Thread::Current();
+      thread->ThrowNewExceptionF("Ljava/lang/IncompatibleClassChangeError;",
           "Class %s implements non-interface class %s",
           PrettyDescriptor(klass.get()).c_str(),
           PrettyDescriptor(ih.GetDescriptor()).c_str());
+      klass->SetVerifyErrorClass(thread->GetException()->GetClass());
       return false;
     }
     // Add this interface.