As per JDK-4695057, the scope of a local class name whose declaration is a
declaration-statement of a switch-block-group
should not extend into the following switch-block-groups.
SeeJDK-4713250 for the underlying spec issue.
declaration-statement of a switch-block-group
should not extend into the following switch-block-groups.
See
- duplicates
-
JDK-4717190 don't allow a local class in a switch to capture a variable form the switch
- Closed