JSR 335 Lambda Specification, 0.6.2
daniel.smith at oracle.com
Fri Mar 1 10:51:56 PST 2013
An updated specification can be found here:
One-page HTML: http://cr.openjdk.java.net/~dlsmith/jsr335-0.6.2.html
Downloadable zip: http://cr.openjdk.java.net/~dlsmith/jsr335-0.6.2.zip
This fills in many of the missing pieces in Part G, Type Inference.
Full change log, from the document:
> Functional Interfaces: Renamed the term functional interface type to just function type, to avoid the assumption that intersection types are excluded from this set. Defined the descriptor of a raw functional interface type. Minor fixes in examples to reflect actual compiler behavior. Adjusted the definition of return-type substitutability to reflect actual compiler behavior.
> Lambda Expressions: Small change to the scoping rules of local classes to avoid confusion.
> Method References: Added a number of well-formedness checks for method references (some new, some previously covered by the compatibility definition). Adjusted terminology so that "method references" refers generally to both "constructor references" and "array creation references".
> Poly Expressions: Incorporated above terminology changes. Added section 15.29, which is just a renumbering of 15.28.
> Typing and Evaluation: Added a lambda compatibility rule that errors do not occur in the lambda body. Made the check for static-ness of a referenced method a post-compatibility error. Removed mention of "synthetic" classes and methods, to clarify that the ACC_SYNTHETIC flag is not mandated. Unified the presentation of "compile-time declarations"/runtime behavior for standard method references, constructor references, and array creation references—the latter two are based on "notional methods" that represent class instance creation or array creation. Moved the error check for exceptions in lambda bodies to 11.2.3.
> Overload Resolution: Changed definition of "potentially compatible" for method references to exclude cases in which there are no method declarations of the desired arity. Defined provisionally-applicable methods to never be more specific rather than always more specific (the outcome should be the same, though). Unified the presentation of "more specific" for fixed-arity and variable-arity methods.
> Type Inference: Specified reduction for subtyping and equality constraints. Specified incorporation. Specified resolution. Updated reduction rules for lambdas and method references to track changes in "Typing and Evaluation." Adjusted terminology so that "bound" refers to all of "proper bounds", "dependencies", and "delayed constraint formulas". Made tweaks to the notation for constraint formulas and bounds.
> Default Methods: Removed support for an explicit package access modifier. Refined the definition of overriding to more accurately represent the intended behavior when the overriding method is inherited (mostly to account for package-access methods).
> Java Virtual Machine: Changed the representation of methods declared in interfaces and passed to invokespecial/invokestatic from a Methodref to an InterfaceMethodref. Rolled back changes that were intended to support Methodref structures that point to methods declared in interfaces.
More information about the lambda-spec-experts