Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 497991

Summary: Missing trailing comments when the same node as leading comments
Product: [ECD] Orion Reporter: Olivier Thomann <Olivier_Thomann>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie
Version: 12.0   
Target Milestone: 13.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Olivier Thomann CLA 2016-07-15 14:43:40 EDT
Working on bug 496318, I could not see the trailing comment attached to the return  -1; statement. I can see in orionAcorn that the comment is attached, but it disappears for some reasons.

function foo(i) {
	if (i > 10) {
		return 1;
	} else {
		// else case
		return -1; // return -1
	}
}
foo(1);

The return -1; statement only has a leading comment and no trailing comment. This is a bug.
Comment 1 Olivier Thomann CLA 2016-07-15 15:15:07 EDT
Fix released as part of the fix for bug 496318.