ART: Fix nits for verifier change
Follow-up to 6659624baadf2285ac5880fd28ffa31767dcae0b.
Bug: 28187158
Change-Id: Ie81aff1cae1ff275faaaf4b858608e74b86d8622
(cherry picked from commit 8f4ade0f05c0203b33e5f421d1e3794ab6075a82)
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index a0987b5..647578e 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -4583,7 +4583,8 @@
// Compiler & unresolved types involved, retry at runtime.
type = VerifyError::VERIFY_ERROR_NO_CLASS;
} else {
- // Classes known, or at compile time. This is a hard failure.
+ // Classes known (resolved; and thus assignability check is precise), or we are at runtime
+ // and still missing classes. This is a hard failure.
type = VerifyError::VERIFY_ERROR_BAD_CLASS_HARD;
}
Fail(type) << "cannot access instance field " << PrettyField(field)
diff --git a/test/800-smali/smali/b_28187158.smali b/test/800-smali/smali/b_28187158.smali
index 7dd2022..14d5cec 100644
--- a/test/800-smali/smali/b_28187158.smali
+++ b/test/800-smali/smali/b_28187158.smali
@@ -6,6 +6,7 @@
.method public static run(Ljava/lang/Integer;)V
.registers 2
- iget v0, p0, Ljava/lang/String;->length:I
+ iget v0, p0, Ljava/lang/System;->in:Ljava/io/InputStream;
+ return-void
.end method