ART: kSuper also has IncompatibleClassChangeError
When resolving methods, kSuper can also have
IncompatibleClassChangeError.
Bug: 17266767
Change-Id: I5fafe03ad578f605825a3d0c89f1254a4a385b76
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index f75dea3..97f20d3 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -5051,7 +5051,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) {