Bug 319450 - Inadvertent Error marker in AJDT editor when assigning "this" to local in ITD
Summary: Inadvertent Error marker in AJDT editor when assigning "this" to local in ITD
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 2.1.1   Edit
Assignee: Andrew Eisenberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 20:16 EDT by Kris De Volder CLA
Modified: 2010-07-20 13:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kris De Volder CLA 2010-07-09 20:16:41 EDT
public aspect SomeAspect {

   public void SomeClass.method() {
      SomeClass me = this;
      ...
   }
}

We get a type error for the assignment of "this" to "me".

I guess it is somewhat unusual to write code like this. Nevertheless it
is correct.

I also suspect we will get similar type errors when passing "this" as an argument, but have not had a chance to test that yet.
Comment 1 Kris De Volder CLA 2010-07-09 20:17:58 EDT
Oh, yes, forgot to mention. 

This is strictly a UI issue. The aspectj compiler handles it correctly. We only see the error in the editor, but not in the "problems" view.
Comment 2 Andrew Eisenberg CLA 2010-07-14 19:50:09 EDT
Interesting...when the aspect and target class are in the default package, there is no spurious error, but when they are in any other package, the problem appears.
Comment 3 Andrew Eisenberg CLA 2010-07-15 13:54:16 EDT
Fixed now locally.
Comment 4 Andrew Eisenberg CLA 2010-07-20 13:33:43 EDT
Fix has been committed.