Issue Details (XML | Word | Printable)

Key: GROOVY-1737
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Paul King
Reporter: Steve Hanmann
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

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

Created: 16/Feb/07 01:58 PM   Updated: 22/Nov/07 05:23 AM   Resolved: 09/Oct/07 11:32 PM
Return to search
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.1-rc-1

Time Tracking:
Not Specified

File Attachments: 1. Text File OverloadableNegate.txt (0.9 kB)

Environment: Any


 Description  « Hide

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



Paul King added a comment - 09/Oct/07 11:32 PM

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


Paul King made changes - 09/Oct/07 11:32 PM
Field Original Value New Value
Assignee Paul King [ paulk ]
Resolution Fixed [ 1 ]
Fix Version/s 1.1-rc-1 [ 13165 ]
Status Open [ 1 ] Resolved [ 5 ]
Paul King made changes - 22/Nov/07 05:23 AM
Status Resolved [ 5 ] Closed [ 6 ]