Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AJDT bug(?) in inter-type declaration

Please update to the latest dev build of AJDT, where this problem is
no longer reproducible.



On Fri, Sep 17, 2010 at 7:25 PM, Andrew Eisenberg <andrew@xxxxxxxxxxxx> wrote:
> 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
> <olaf.klischat@xxxxxxxxxxxxxx> 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
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>


Back to the top