Summary: | [Compiler] should reject Local type usage when defined in other switch case block | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.0 M8 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Philipe Mulet
2004-02-17 04:42:43 EST
Javac 1.4.1, Jikes 1.18 do tolerate this code as we do. Interestingly enough, the spec still allows the variable 'i' to be seen across switch case blocks... only a definite assignment issue is raised. The name can be resolved. class X { public static void main(String[] args) { switch(args.length) { case 1: int i = 0; break; case 0 : System.out.println(i); } } } Fixed, added regression tests: Compliance13/Compliance14#test073 & test074 Verified in build I200403240800. |