You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Theodorou (JIRA)" <ji...@apache.org> on 2016/09/27 18:57:20 UTC

[jira] [Commented] (GROOVY-7949) Disallow static inner classes within anonymous classes

    [ https://issues.apache.org/jira/browse/GROOVY-7949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15527101#comment-15527101 ] 

Jochen Theodorou commented on GROOVY-7949:
------------------------------------------

Does Java not allow this? I know it allows them in methods

> Disallow static inner classes within anonymous classes
> ------------------------------------------------------
>
>                 Key: GROOVY-7949
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7949
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Daniil Ovchinnikov
>
> This just does not make sense, but works:
> {code}
> def a = new Hello() {
>     static class Hello {
>         def foo() { "hello" }
>     }
> }
> println a.foo()
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)