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

Bug 495992

Summary: Improve error message for else after return
Product: [ECD] Orion Reporter: Olivier Thomann <Olivier_Thomann>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: cshekhar.suthar, curtis.windatt.public, Michael_Rennie
Version: 11.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Olivier Thomann CLA 2016-06-13 09:00:07 EDT
The message says: "Unexpected 'else' after 'return'". This is actually misleading as the else is fine at that location. It is just unnecessary.
So it would be better to report: "Unnecessary 'else' after 'return'".