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

Bug 328309

Summary: validate repeated constant case expression value causing unreachable cases
Product: z_Archived Reporter: Henrik Lindberg <henrik.lindberg>
Component: b3Assignee: Project Inbox <b3.engine-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Henrik Lindberg CLA 2010-10-20 22:26:13 EDT
An anticipated common user error is to enter the same constant case expression multiple times (either for the same case (harmless), or for different cases (not good).

The constant evaluator can be used to also catch all expression cases. 
Examples:

case 10 : ...
case 5+5 : ...
case 10 : ...

Cases #2 and #3 are unreachable.

The other unreachable cases are validated in the EMF model. But this validation requires access to evaluator - add the validation in the BeeLangJavaValidator.