[Bug java/16839] Final vars in switch generate compile error in anonymous class.

tromey at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Jul 31 16:10:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list