0.6a, section "Closure Conversion"
Peter Levart
peter.levart at marand.si
Mon Dec 14 23:18:40 PST 2009
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/9eaffb33/attachment.html
More information about the closures-dev
mailing list