-
Enhancement
-
Resolution: Unresolved
-
P5
-
8
-
None
It's often difficult to find rules in Chapter 16 that apply to a particular piece of code. Some reorganization could help a lot.
16.2.2 uses "block" as a catch-all term for anything in braces, and has rules here for handling of class declarations, initializers, methods, and constructors. But then additional rules for these things appear in 16.7, 16.8, and 16.9.
16.6 covers anonymous classes, even though they are expressions and properly belong in 16.1.
16.1.10 covers lambda expressions (perJDK-8043176), even though they probably ought to appear in their own subsection.
A read-through of the whole chapter will probably highlight some other anomalies.
16.2.2 uses "block" as a catch-all term for anything in braces, and has rules here for handling of class declarations, initializers, methods, and constructors. But then additional rules for these things appear in 16.7, 16.8, and 16.9.
16.6 covers anonymous classes, even though they are expressions and properly belong in 16.1.
16.1.10 covers lambda expressions (per
A read-through of the whole chapter will probably highlight some other anomalies.
- relates to
-
JDK-8043176 16.1.10: Add DA/DU rules for lambda expressions
- Closed