Bug 82670

Summary: [5.0] wrong source range for VariableDeclarationFragment with ArrayCreation
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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