Bug 355439 - [recovery][quick fix] Suggest variable/field assignment fix for unassigned array constructions
[recovery][quick fix] Suggest variable/field assignment fix for unassigned ar...
Status: NEW
Product: JDT
Classification: Eclipse
Component: Core
3.8
All All
: P3 normal (vote)
: ---
Assigned To: Ayushman Jain CLA Friend
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-08-22 16:31 EDT by Remy Suen CLA Friend
Modified: 2011-11-08 11:21 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA Friend 2011-08-22 16:31:48 EDT
I20110809-0800

public class Test {
  public Test(int nodesCount){
    new int[nodesCount];
  }
}

I should get a suggestion for creating a new local variable or a field in this class.
Comment 1 Deepak Azad CLA Friend 2011-10-31 05:59:35 EDT
Problem is that there is a parser error and there is no recovered statement in the AST for the array creation. 

This is what I see in ASTView for the method body of Test.
Block [50, 75] (recovered)
   STATEMENTS (0)

Moving to JDT/Core.
Comment 2 Ayushman Jain CLA Friend 2011-10-31 06:15:32 EDT
Will see what can be done, time permitting.