Project: AspectJ
Bug 68991 intertype initialisers should match field set pointcuts
Reported: 2004-06-30 07:51:21 | Status: resolved fixed

/* initialisers of intertype fields should match field set pointcuts. In the example below, the output should be set field set(int C.n) set field set(int C.m) get field get(int C.n) set field set(int C.n) but the first field set (of C.n) is not picked up. */ aspect Aspect { private int C.n = 13; before() : get(* C.*) { System.out.println("get field "+thisJoinPointStaticPart); } before() : set(* C.*) { System.out.println("set field "+thisJoinPointStaticPart); } public void C.foo() { n++; } } class C { int m = 20; } public class ITFieldsAdvice { public static void main(String[] args) { C c = new C(); c.foo(); } }

Files changed in fix:
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java tests/bugs/PR68991/Oxford.java tests/bugs/PR68991/Simple.java tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java