Bug 36895 - AST tree : VariableDeclarationStatement have bad parent
Summary: AST tree : VariableDeclarationStatement have bad parent
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-25 08:26 EDT by jerome Bozier CLA
Modified: 2003-06-02 06:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.