Summary: | REGRESSION - code with legal forward reference does not compile | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Daniel <dsegall> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | VERIFIED DUPLICATE | QA Contact: | |
Severity: | blocker | ||
Priority: | P3 | CC: | Olivier_Thomann |
Version: | 3.4.2 | ||
Target Milestone: | 3.5 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Daniel
2009-05-11 17:07:49 EDT
In fact the reference needs to be qualified in order to be used in a forward reference. So this code compiles fine: public enum X { SAMPLE(X.TEST); private static final int TEST = 1; int x; X(int x) { this.x = x; } } but the code in comment 0 should report an error. Now this doesn't solve the problem with 3.4.2 that has a bug. See bug 263877. *** This bug has been marked as a duplicate of bug 255452 *** Yes, the code that you provided is actually the code that I meant to submit (with the qualified reference). That code still doesn't compile for me in 3.4.2. Is that case also covered by #255452? (In reply to comment #2) > Is that case also covered by #255452? Now this is bug 263877 that has been fixed post 3.4.2. The fix is available in the 3.5 stream since 3.5M6. According to the last comment in #263877, there should be a patch for the 3.4 stream for this issue. When will that be available through the "Search for Updates" feature? No, there is a jar that provides this fix available on the JDT/Core update page. See http://www.eclipse.org/jdt/core/r3.4/index.php#UPDATES. This has to be applied through a feature patch or via an update site. There is no "official" Eclipse build post 3.4.2. I'll see if I can setup an update site on the JDT/Core page that would provide this update. The patch doesn't work. The versions dialog lists the version for org.eclipse.jdt.core as 3.4.5.v_895_R34x, but I still get the same compiler errors. What's the correct way to install this patch? I'm also compiling using compatibility level 1.6, and bug #263877 was marked as [1.5]. Was it also fixed for the 1.6 compiler? Yes, this is fixed for any compliance level >= 1.5. I'll send you a patch and you'll tell me if it works for you. As the comment 0 does not compile in Eclipse 3.4.2, this bug is rather a duplicate of bug 263877 rather than bug 255452. Hence, change the target accordingly... *** This bug has been marked as a duplicate of bug 263877 *** Verified using build I20090313-0100 (aka 3.5M6) |