diff --git a/src/test/java/bytecode/InheritTest.java b/src/test/java/bytecode/InheritTest.java index 2373d40d4..29ebe8a15 100644 --- a/src/test/java/bytecode/InheritTest.java +++ b/src/test/java/bytecode/InheritTest.java @@ -147,7 +147,7 @@ public class InheritTest { classToTest = loader.loadClass("Inherit"); Method m = classToTestAA.getDeclaredMethod("m", Integer.class); assertEquals(m.invoke(instanceOfClassAA, 5), "AA"); - classToTestAA = classToTestAA.getField("aafield").getType(); + classToTestAA = classToTest.getDeclaredField("aafield").getType(); Method main = classToTest.getDeclaredMethod("main", classToTestAA, Integer.class); assertEquals(main.invoke(instanceOfClass, instanceOfClassAA, 5), "AA"); } diff --git a/src/test/resources/bytecode/javFiles/Inherit.jav b/src/test/resources/bytecode/javFiles/Inherit.jav index 11ca65d3d..ba9f30bd8 100644 --- a/src/test/resources/bytecode/javFiles/Inherit.jav +++ b/src/test/resources/bytecode/javFiles/Inherit.jav @@ -6,14 +6,15 @@ import java.lang.String; public class Inherit { -//AA aafield; + AA aafield; + //m(Integer i) { return "AA"; } - - main(d, i) { + + main2(d, i) { return d.m(i); } - main(v, i) { + main2(v, i) { var aa = v.elementAt(0); return aa.m(i); }