groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: @CompileStatic void method returns null ?
Date Wed, 29 Aug 2018 08:35:07 GMT
See also: https://issues.apache.org/jira/browse/GROOVY-8770

Which I presume was also to mimick dynamic behavior.

Cheers, Paul.


On Wed, Aug 29, 2018 at 4:42 AM Jochen Theodorou <blackdrag@gmx.org> wrote:

> On 28.08.2018 19:45, mg wrote:
> > Since I just stumbled across this behavior while helping a junior
> > developer debug his code: Why does statically compiled Groovy (2.5.2)
> > return null from void methods, instead of raising a compile error ?
>
> i was actually not aware we kept this logic for static compilation, but
> essentially it is like that because of dynamic Groovy, which derives
> this from the reflective and methodhandles based method invocation
>
> bye Jochen
>

Mime
View raw message