ART: kSuper also has IncompatibleClassChangeError
When resolving methods, kSuper can also have
IncompatibleClassChangeError.
Bug: 17266767
(cherry picked from commit 9cb8d7a9a5013dd1e6734d9643573a4750d869e2)
Change-Id: I5fafe03ad578f605825a3d0c89f1254a4a385b76
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 74c5c15..e36384e 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -5044,7 +5044,11 @@
}
break;
case kSuper:
- ThrowNoSuchMethodError(type, klass, name, signature);
+ if (resolved != nullptr) {
+ ThrowIncompatibleClassChangeError(type, kDirect, resolved, referrer.Get());
+ } else {
+ ThrowNoSuchMethodError(type, klass, name, signature);
+ }
break;
case kVirtual:
if (resolved != nullptr) {