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

Bug 361170

Summary: AspectJ editor shows wrong error marker with ITD and this
Product: [Tools] AJDT Reporter: Alexander Winter <awi.eclipse>
Component: UIAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: andrew.eisenberg
Version: 2.1.3   
Target Milestone: 2.2.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Example project which shows the error marker in the editor none

Description Alexander Winter CLA 2011-10-17 13:40:17 EDT
Build Identifier: M20110210-1200

When adding an intertype declaration on a class B which extends A and inserting a method with the ITD which just returns the B instance as A, a wrong error marker shows up in the editor. This is only a minor bug, as the ajc compiles everything correctly.

Reproducible: Always

Steps to Reproduce:
1. Define two classes A and B, where B extends A.
2. Define an aspect AspectC which declares a new method returnA() on B that returns an A.
3. The method body should just be filled with "return this".
Comment 1 Alexander Winter CLA 2011-10-17 13:43:07 EDT
Created attachment 205358 [details]
Example project which shows the error marker in the editor

This project can be imported to reproduce the bug as well. Simply open "MyExtendingAspect" in the editor.
Comment 2 Andrew Eisenberg CLA 2011-10-17 15:19:15 EDT
Thanks for the sample project.  I can reproduce the problem.  This is an AJDT bug, not AspectJ.  I am moving this bug report to AJDT.
Comment 3 Andrew Eisenberg CLA 2012-02-29 19:56:42 EST
I have a fix for this.  After some more testing, I will commit.