Call to defender method with missing return keyword hangs the JVM
Neal Gafter
neal at gafter.com
Thu Dec 15 09:01:13 PST 2011
On Wed, Dec 14, 2011 at 11:35 PM, Per Rovegård <per at rovegard.se> wrote:
> 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?
You mean without the curly braces?
More information about the lambda-dev
mailing list