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 2024/01/30 22:07:00 UTC

[jira] [Created] (GROOVY-11303) trait static method could remain available through compiled interface

Eric Milles created GROOVY-11303:
------------------------------------

             Summary: trait static method could remain available through compiled interface
                 Key: GROOVY-11303
                 URL: https://issues.apache.org/jira/browse/GROOVY-11303
             Project: Groovy
          Issue Type: Improvement
            Reporter: Eric Milles


Consider the following:
{code:groovy}
trait T {
  static m() { ... }
}
{code}

Once this is compiled, it results in something like:
{code:groovy}
interface T {
  class T$Trait$Helper {
    static m(Class<T> self) { ... }
  }
}
{code}

Now that interfaces support static methods, the static method could remain as part of the interface offering -- callable in groovy and java as "T.m()".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)