Details

    • Type: Documentation
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.4.6
    • Component/s: Documentation
    • Labels:
      None

      Description

      Category docs refer to @Mixin but they are deprecated
      http://docs.groovy-lang.org/latest/html/gapi/groovy/lang/Category.html

      I found that using traits is not possible. But it would be nice to be able to use them.

      Tried a workaround but didn't work

      trait Util {
          Number getTwice() { this * 2 }
          Number max(Number otherNumber) { Math.max(this, otherNumber) }
      }
      
      @groovy.lang.Category(Number)
      abstract class UtilCategory implements Util {
      }
      

        Attachments

          Activity

            People

            • Assignee:
              pascalschumacher Pascal Schumacher
              Reporter:
              anshbansal Aseem Bansal
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: