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:10:00 UTC

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

     [ https://issues.apache.org/jira/browse/GROOVY-11303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles updated GROOVY-11303:
---------------------------------
    Labels: interface traits  (was: )

> 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
>            Priority: Major
>              Labels: interface, traits
>
> 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)