You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pr105181.aj 806B

12345678910111213141516171819202122232425262728293031323334
  1. class Foo {}
  2. aspect Injector {
  3. Foo Foo.field;
  4. public Foo Foo.foo() { System.out.println("hello"); return field; }
  5. }
  6. public class pr105181 {
  7. static void sink(Foo foo) {}
  8. public static void main(String[] args) throws Exception {
  9. java.util.Vector<Foo> source = new java.util.Vector<Foo>();
  10. source.add(new Foo());
  11. /**
  12. * This next line causes a verify error when we try to access the ITD'd field
  13. */
  14. Foo f = source.get(0).field;
  15. /**
  16. * According to the bug report, this line should to - but I couldn't get a
  17. * method to fail...
  18. */
  19. Foo f2 = source.get(0).foo();
  20. }
  21. public void worksOK() {
  22. java.util.Vector<Bar> source = new java.util.Vector<Bar>();
  23. source.add(new Bar());
  24. Bar b = source.get(0).field;
  25. }
  26. }
  27. class Bar {
  28. Bar field;
  29. }