Summary: | The built-in Eclipse compiler behaves differently than IBM or Sun JDK | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Thomas Pollinger <tpollin> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | CC: | steven.wasleski |
Version: | 3.0.1 | ||
Target Milestone: | 3.1 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Thomas Pollinger
2005-03-08 22:03:33 EST
BTW, forgot to mention the compiler error message: Severity Description Resource In Folder Location Creation Time 2 C cannot be resolved or is not a type test2.java test line 27 March 8, 2005 19:01:05 Reproduced. This is indeed our bug. When addressed, do you need this to be backported to 3.0.* maintenance stream ? i.e. how 'critical' is this ? Problem got introduced when adding support for preventing referencing local types across switch case statement blocks (see bug 52221). Tuned implementation to handle this situation, and also possibly nested switch statements: public class X { public void test() { int l = 1; switch(l) { case 1: class C { public C() { } public void foo() { System.out.println("hello"); } } int n = 0; switch (n) { case 0 : if (true) { C c2 = new C(); } } } } } Added LookupTest#052-053. Fixed We have a workaround for this problem where if this specific case happens, it can be compiled by the regular JDK that sits on the server. As such, it would not qualify for upgrading our current 3.0.1 workbench to have this fix in. The next window of opportunity to upgrade the workbench might probably be 3.1 already. So from our standpoint, it does not need to be backported to 3.0.x. Thanks for the quick turnaround. Thanks for the assessment Verified in I20050330-0500 |