You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2026/03/21 20:23:00 UTC
[jira] [Created] (GROOVY-11877) anon. inner class is never static
Eric Milles created GROOVY-11877:
------------------------------------
Summary: anon. inner class is never static
Key: GROOVY-11877
URL: https://issues.apache.org/jira/browse/GROOVY-11877
Project: Groovy
Issue Type: Bug
Components: Compiler
Reporter: Eric Milles
Consider the following:
{code:groovy}
interface I {
def foo = new Object() {}
}
{code}
The anon. inner class I$1 is static because it is within an interface. However, JLS 15.9.5 states "An anonymous class is always an inner class". And JLS 8.1.3 further states "An inner class is a nested class that is not explicitly or implicitly static."
--
This message was sent by Atlassian Jira
(v8.20.10#820010)