Bug 36895

Summary: AST tree : VariableDeclarationStatement have bad parent
Product: [Eclipse Project] JDT Reporter: jerome Bozier <jbozier>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 3.0 M1   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description jerome Bozier CLA 2003-04-25 08:26:44 EDT
when i analyze this kind of code :

package codeManipulation;

public class bug {
	static private int dummyFct3() {
		return 3;	
	}	
	static private int dummyFct2() {
		return 3;	
	}		
	static private void pipo () {
		int z = bug.dummyFct3(),y=bug.dummyFct2();

	}
}


the VariableDeclarationStatement that modelize the line "int z = bug.dummyFct3
(),y=bug.dummyFct2();" have a null parent instead of a Block node

if i modify a little this original code :

package codeManipulation;

public class bug {
	static private int dummyFct3() {
		return 3;	
	}	
	static private int dummyFct2() {
		return 3;	
	}		
	static private void pipo () {
		int z = bug.dummyFct3();
		int y=bug.dummyFct2();

	}
}
it works perfectly

used installation :
Version: 2.1.0
Build id: 200303272130
Comment 1 Olivier Thomann CLA 2003-04-28 09:25:31 EDT
I will investigate.
Comment 2 Olivier Thomann CLA 2003-04-28 11:40:51 EDT
I cannot reproduce using the first code snippet. So this has been fixed in
latest code. Please reopen if you see it again.
Comment 3 Olivier Thomann CLA 2003-04-28 11:41:40 EDT
Change milestone.