This is very likely an AJDT bug. I raised a bug for it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=325668
As you have already seen, this bug does not affect compilation, only editor functionality. On Fri, Sep 17, 2010 at 2:36 PM, Olaf Klischat <[email protected]> wrote: > This minimal aspect: > > public aspect PSTest { > > interface PS { > } > > private PS PS._this = this; > } > > ...compiles and runs perfectly when compiled with ajc[1], but fails in AJDT > with a compiler error: Apparently AJDT erroneously assumes the static type > of the "this" expression to be PSTest rather than PSTest.PS, which leads to > AJDT rejecting the assignment to a variable of type PSTest.PS. > > I'm using AJDT 2.1.0 on Eclipse 3.5.2. > > [1] > If you add some actual code that instantiates PS or a subclass of it and > prints out the _this variable at runtime, and compile everything with ajc > and run it, you see that it really does do what it should do, i.e. the > correct PSTest.PS instance is assigned to _this. > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
