Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

PR61572.aj 667B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* intertype method declarations should be a static context;
  2. it is incorrect to refer to instance variables of the
  3. originating aspect. ajc fails to check this properly when
  4. an ITD method is applied to an inner class.
  5. The example below compiles fine, but then throws
  6. java.lang.NoSuchFieldError: zzz
  7. when run.
  8. */
  9. aspect NewFoo {
  10. int zzz = 3;
  11. public void Aaa.Ccc.bar() {
  12. System.out.println(zzz); // CE L19: illegal reference to zzz
  13. }
  14. }
  15. class Aaa {
  16. public class Ccc {
  17. }
  18. public Ccc ccc;
  19. public Aaa() {
  20. ccc = new Ccc();
  21. }
  22. }
  23. class IllegalRef {
  24. public static void main(String[] args) {
  25. Aaa aaa = new Aaa();
  26. aaa.ccc.bar();
  27. }
  28. }