Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 437426

Summary: False positives from no-dupe-keys when using setter and getter
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: JS ToolsAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 5.0   
Target Milestone: 6.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-06-13 18:56:44 EDT
1. Create a js file with this code:
var x = {
	set state(value) {
		this._state = value;
	},
	get state() {
		return this._state;
	}
};
2. You see an error "duplicate key 'state'". This is incorrect. The properties have the same identifier name, but their .kind fields are different.

The rule needs to check the kinds too.
Comment 1 Mark Macdonald CLA 2014-06-14 11:35:04 EDT
Selfishly fixed because I want to use a getter and setter

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ee9b129