Call to defender method with missing return keyword hangs the JVM

Per Rovegård per at rovegard.se
Fri Dec 16 00:15:58 PST 2011


On Thu, Dec 15, 2011 at 6:01 PM, Neal Gafter <neal at gafter.com> wrote:
> On Wed, Dec 14, 2011 at 11:35 PM, Per Rovegård <per at rovegard.se> wrote:
>> No problem! Forgive me if this has been discussed before, but wouldn't
>> it be nice to allow expression syntax in this case, to be consistent
>> with lambdas?
>
>
> You mean without the curly braces?

No, that's not what I meant, but I realize now that it is the
implication of my question. Given that the defender method is a body
rather than an expression, the curly braces and an explicit "return"
make sense. Expression syntax within curly braces doesn't make sense,
I suppose!

--Per


More information about the lambda-dev mailing list