Project: AspectJ
Bug 108377 Verify Error on intertype field indirection in intertype method
Reported: 2005-08-30 11:01:24 | Status: resolved fixed

When I run this program: public class A { public static void main(String[] args) { System.out.println(new A().foo()); } } aspect Aspect1 { public A A.a; public String A.value; public String A.foo() { return a.value; } } I get the error: Exception in thread "main" java.lang.VerifyError: (class: Aspect1, method: ajc$interMethod$Aspect1$A$foo signature: (LA;)Ljava/lang/String;) Incompatible type for getting or setting field at A.<init>(A.java:1) at A.main(A.java:3) Javap reveals that the field name is missing the class name part: 1: getfield #50; //Field a:LA; 4: getfield #46; //Field A.value:Ljava/lang/String; If I replace a.value by this.a.value, the correct code is generated: 1: getfield #37; //Field A.a:LA; 4: getfield #46; //Field A.value:Ljava/lang/String;

Files changed in fix:
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java