Ensure structural redefinition can shadow functions/fields
Previously when we structurally redefined a class and a new field or
function shadowed a super type field or function the shadowed version
might still get called. This was due to the old version remaining in
the dex-caches of other classes. To fix this we just remove from all
dex-caches any entries that might be (invisibly) shadowed by a new
function/field. This is any non-virtual methods or non-private field
of a supertype of the redefined class with the same name & signature
as a method/field in the redefined class.
Test: ./test.py --host
Bug: 134162467
Change-Id: Iae8e7a3e7f8ecedbd2f314816b140156fce3e5fd
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 0134a54..cd66472 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -1145,7 +1145,9 @@
"1990-structural-bad-verify",
"1991-hello-structural-retransform",
"1992-retransform-no-such-field",
- "1993-fallback-non-structural"
+ "1993-fallback-non-structural",
+ "1997-structural-shadow-method",
+ "1998-structural-shadow-field"
],
"variant": "jvm",
"description": ["Doesn't run on RI."]