Merge branch 'addPackages' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into addPackages

This commit is contained in:
pl@gohorb.ba-horb.de 2020-05-11 13:47:16 +02:00
commit b3b25b7869
2 changed files with 6 additions and 5 deletions

View File

@ -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");
}

View File

@ -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);
}