Bug 275246 - [compiler] constructor-scoped inner class nonstatic initializers ignore variable initialization
Summary: [compiler] constructor-scoped inner class nonstatic initializers ignore varia...
Status: VERIFIED DUPLICATE of bug 257716
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-06 22:16 EDT by Hollis Waite CLA
Modified: 2009-05-14 12:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hollis Waite CLA 2009-05-06 22:16:57 EDT
Build ID: M20090211-1700

Steps To Reproduce:
class Test {
  final Object o;
  Test() {
    o = "";
    new Object() {{o.toString();}};
  }
}

More information:
"The blank final field <var> may not have been initialized".  Compiles fine in JDK 1.6.0_13.
Comment 1 Olivier Thomann CLA 2009-05-07 09:18:37 EDT
This is also fixed with version v_956 of JDT/Core.
I'll try to find the corresponding bug that was fixed.
Comment 2 Olivier Thomann CLA 2009-05-07 10:01:38 EDT
Closing as a duplicate of bug 257716.
Added regression test org.eclipse.jdt.tests.compiler.regression.InitializationTest#test204

*** This bug has been marked as a duplicate of bug 257716 ***
Comment 3 Frederic Fusier CLA 2009-05-14 12:17:51 EDT
Verified for 3.5M6 using build I20090313-0100