Details
-
Documentation
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4.5
-
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 { }