0.6a, section "Closure Conversion"
Neal Gafter
neal at gafter.com
Tue Dec 15 08:09:32 PST 2009
No, it should be "and". Think of it this way: if the body completes
normally, the compiler inserts a "return;" statement at the end (without an
expression).
On Mon, Dec 14, 2009 at 11:18 PM, Peter Levart <peter.levart at marand.si>wrote:
> reads...
>
> "A lambda expression may be converted to any compatible interface type by
> the lambda conversion, which is a kind of widening reference conversion.
>
> There is a lambda conversion from a lambda expression to every interface
> type that has a single method m such that the lambda expression is
> compatible with m. A lambda expression is compatible with a method m iff
> all of the following hold:
>
> - Either
> - The lambda expression is an expression lambda, and there is an
> assignment conversion from the type of its result expression to the return
> type of m; or
> - The lambda expression is a statement lambda, and either
> - its body cannot complete normally *and* there is an assignment
> conversion from the type of the expression in each of its return statements
> to the return type of m; or
> - all of its return statements yield no return value, and the method
> m has return type void or java.lang.Void
> - ...
>
> "
>
> Shouldn't the bolded *and* really be *or* ?
>
> Peter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091215/e8cd78cc/attachment.html
More information about the closures-dev
mailing list