| Summary: | Unreachable code treated like dead code | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Marvin Fröhlich <eclipse> |
| Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Olivier_Thomann |
| Version: | 3.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
This is an error as per JLS. Therefore this cannot be changed or make optional. It is a mandatory error. Sorry. Closing as INVALID. |
Build Identifier: 20090920-1017 The following code is not compilable. ############## public void test() { return; System.out.println( "sdfsdf" ); } ############## The sysout will be marked as unreachable code. Even if this is true, I would like this to be handled like dead code and only warned about. Sometimes it is handy to just add a return statement to not execute the following code for testing. Sometimes I cannot simply comment out this code, because I already have block comments in it. Reproducible: Always