Bug 460087 - @Accessors setter return type and value
Summary: @Accessors setter return type and value
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.8.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 05:38 EST by RK Waters CLA
Modified: 2015-02-17 05:49 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RK Waters CLA 2015-02-17 05:38:50 EST
The @Accessors annotation currently generates a setter method with the signature void setX(T x). This is in keeping with JavaBean conventions. However, it introduces a subtle change to the expected behaviour of assignment: normally, a = b returns b; however, when a is a property, a = b returns void. There are some idioms this breaks.

I think an option should be added to the annotation to allow for the generation of T setX(T x) where x is returned after assignment.