Call to defender method with missing return keyword hangs the JVM

Per Rovegård per at rovegard.se
Wed Dec 14 23:35:10 PST 2011


On Thu, Dec 15, 2011 at 3:54 AM, Robert Field <Robert.Field at oracle.com> wrote:
> On 12/14/11 3:52 PM, Per Rovegård wrote:
>>
>> In the defender/default implementation of sayHi, I assumed that the
>> compiler would infer that a value needs to be returned (like with
>> closures). And the compiler indeed doesn't complain about the missing
>> "return" keyword.
>
> I don't believe this is the current plan.  I think this is a straight-up
> compiler bug.
>
> Thanks for reporting this (no it isn't known)

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?

-- Per


More information about the lambda-dev mailing list