Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319450

Summary: Inadvertent Error marker in AJDT editor when assigning "this" to local in ITD
Product: [Tools] AJDT Reporter: Kris De Volder <kdevolder>
Component: UIAssignee: Andrew Eisenberg <andrew.eisenberg>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 2.1.0   
Target Milestone: 2.1.1   
Hardware: PC   
OS: Linux   
Whiteboard:

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.