Bug 82670 - [5.0] wrong source range for VariableDeclarationFragment with ArrayCreation
Summary: [5.0] wrong source range for VariableDeclarationFragment with ArrayCreation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-12 10:21 EST by Markus Keller CLA
Modified: 2005-02-16 10:13 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2005-01-12 10:21:20 EST
I20050104-1600 + jdt.core from HEAD

public class Test {
    Object o= new HashMap<?, ?>[0];
}

The source range of the VariableDeclarationFragment is:
          "o= new HashMap<?"
Expected:
          "o= new HashMap<?, ?>[0]"

Maybe related to the error in the JLS3 grammar (15.10 Array Creation
Expressions), which would not allow wildcards as type arguments there.
Comment 1 Olivier Thomann CLA 2005-01-12 12:57:21 EST
No the bug is when I retrieve the semi-colon or comma position that ends the
fragment.
Fixed and released in HEAD.
Regression test added in ASTConverter15Test.
Comment 2 David Audel CLA 2005-02-16 10:13:19 EST
Verified in I20050215-2300