Summary: | SANITY CHECK error when compiling a specific switch statement | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 2.1 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Olivier Thomann
2002-12-13 15:41:17 EST
javac 1.4.1 cannot compile this code successfully. It has a VerifyError at runtime. Exception in thread "main" java.lang.VerifyError: (class: X, method: main signature: ([Ljava/lang/String;)V) Accessing value from uninitialized register 0 Jikes 1.18 compiles it fine. I think adding the local declaration to the list of visible locals before returning because the local is not reachable is ok, because this has no effect on the range of local initializations. It simply adds the local binding to the list of visible locals in the code stream and this is the list used to close the locals at the end of the switch statement. So I won't see the local when it is not initialized in the debugger it I do that. Indeed, you're right. The variable should be added since it got allocated a position. Fixed Verified. |