Bug 38674

Summary: 3.0 M1 - Preserve unused local variables doesn't seem to work
Product: [Eclipse Project] JDT Reporter: Scott Eade <seade>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 3.0 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Scott Eade CLA 2003-06-09 20:33:56 EDT
I have some static initialisers that I am forcing to execute from another class
using an unused local variable thus:

        Class c = Layout.class; // c is never used

When compiled with Eclipse 2.1 (actually one of the maintenance builds) this has
the desired effect of forcing the static initializers in my Layout class to be
executed, but in Eclipse 3.0-M1 it does not (even though the Java, Compiler,
Compliance and Classfiles, Preserve unused local variables preference is set).
Comment 1 Philipe Mulet CLA 2003-06-10 06:42:00 EDT
This has nothing to do with preservation of unused local variable. This is a 
consequence of fix for bug 37565. FYI, class literal is spec'ed to not perform 
class init, and we had a bug (as other compilers).

See related bug for link to spec.