This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/18147] Objects in instance initializer blocks are scoped too widely
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 25 Oct 2004 18:49:33 -0000
- Subject: [Bug java/18147] Objects in instance initializer blocks are scoped too widely
- References: <20041025184625.18147.csm@gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-25 18:49 -------
Confirmed, a workaround is to do something like this:
import java.util.HashMap;
class init
{
{{
Object foo = new Object();}
}
{
Object foo = new Object();
}
}
The reduced testcase:
import java.util.HashMap;
class init
{
{
Object foo = new Object();
}
{
Object foo = new Object();
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2004-10-25 18:49:33
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18147