This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/16839] Final vars in switch generate compile error in anonymous class.
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2004 16:10:14 -0000
- Subject: [Bug java/16839] Final vars in switch generate compile error in anonymous class.
- References: <20040730222448.16839.beandz@hotmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tromey at gcc dot gnu dot org 2004-07-31 16:10 -------
I believe the bug here is that gcj captures all
final local variables in an anonymous class constructor,
whether or not those variables are used by the class.
This means that "s" appears to be used by the
"new" invocation, causing the definite assignment code
to emit an error (which would be correct if the anonymous
class actually had a use of the variable).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-07-31 16:10:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16839