Bug 439868 - [xtend][refactoring] Rename refactoring ignores names conflicts and breaks references
Summary: [xtend][refactoring] Rename refactoring ignores names conflicts and breaks re...
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.6.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-07-18 04:33 EDT by Anton Kosyakov CLA
Modified: 2017-09-07 13:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kosyakov CLA 2014-07-18 04:33:13 EDT
1. Xtend code:
class Foo {
	
	String lalala
	
	def bar(String lalala2) {
		lalala // the reference to the field 'lalala'
	}
	
}

2. Rename the argument lalala2 to lalala.
3. Rename refactoring will be completed without errors and produces the following code: 
class Foo {
	
	String lalala
	
	def bar(String lalala) {
		lalala // the reference to the argument 'lalala'
	}
	
}
4. The reference inside the 'bar' method points to the argument instead of the field.

Rename refactoring should fix affected references or at least provides an error. In that case a refactored code could look like:
class Foo {
	
	String lalala
	
	def bar(String lalala) {
		this.lalala // still the reference to the field 'lalala'
	}
	
}