groovy

Map unary negation operator to a method and be able to overload it via a Category

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1-rc-1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Any
  • Number of attachments :
    1

Description

It would be nice to be able to map the unary negation operator to a method and be able to overload it via a Category, like can be done for the binary math operators (+, -, *, /, etc.).

Activity

Hide
Paul King added a comment -

You can now override negative(), positive() and bitwiseNegate() corresponding to -x, +x, ~x.

Show
Paul King added a comment - You can now override negative(), positive() and bitwiseNegate() corresponding to -x, +x, ~x.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: