Bug 282948

Summary: [AspectConvertingParser] type parameter in return type is causing spurious errors in editor
Product: [Tools] AJDT Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CoreAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: dave
Version: unspecified   
Target Milestone: 2.0.1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Andrew Eisenberg CLA 2009-07-08 22:49:58 EDT
I have this simple aspect and class that gives a spurious error in the editor:

public aspect RR {
    public R<?> R.c() {
        return null;
    }    
    after() : execution(R.new())  { }
    
}
class R<T> { }

Delete the '<?>' or the after advice and the spurious error disappears.
Comment 1 Andrew Eisenberg CLA 2009-07-08 23:04:59 EDT
It's the question mark.  Parser/scanner is thinking it is part of a  ? : operator;

Solution is to keep track of type parameter nesting.
Comment 2 Andrew Eisenberg CLA 2009-07-09 13:15:01 EDT
Fixed with regression tests.  Will be available in next dev build.

Also, addressed situations where there are nested type parameters, inner classes and inner aspects that use '?'.