Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11303

trait static method could remain available through compiled interface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Consider the following:

      trait T {
        static m() { ... }
      }
      

      Once this is compiled, it results in something like:

      interface T {
        class T$Trait$Helper {
          static m(Class<T> self) { ... }
        }
      }
      

      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()".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              emilles Eric Milles
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: