Project: AspectJ
Bug 36936 Error when introducing members of type Class
Reported: 2003-04-25 16:36:56 | Status: resolved fixed

Using AspectJ 1.1 RC1 public aspect Asp { public Class Trg.member = String.class; } public class Trg { public static void main(String args[]) { new Trg(); System.out.println("All ok"); } } Compiling with "ajc Asp.java Trg.java" and running Trg, prints "All ok", as it should. Compiling with "ajc Trg.java Asp.java" and running Trg gives: Exception in thread "main" java.lang.NoSuchFieldError: class$0 at Asp.ajc$interFieldInit$Asp$Trg$member(Asp.java:2) at Trg.<init>(Trg.java:1) at Trg.main(Trg.java:3) Note, introduced field must be of type Class, or array of Classes, works fine else.

Files changed in fix:
tests/bugs/interSpecials/Asp.java tests/bugs/interSpecials/Trg.java