Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365193 - [xtend] refactoring: invalid validation "method will have constructor name"
Summary: [xtend] refactoring: invalid validation "method will have constructor name"
Status: CLOSED WONTFIX
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.2.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 08:45 EST by Moritz Eysholdt CLA
Modified: 2012-11-01 06:42 EDT (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 Moritz Eysholdt CLA 2011-11-30 08:45:26 EST
Example:

-------
class foo {
	def bar() {}
}
-------

refactor "bar" to "foo" and refactoring will raise a warning "If you proceees, the method....... will have a constructor name".

This validation is invalid, since in Xtend the constructors are named "new" and not like the class (as in Java).
Comment 1 Jan Koehnlein CLA 2011-12-08 07:16:43 EST
This message comes frm JDT and is not essentially wrong: It will compile to a Java method that has a constructor name. This issue will be hidden, as we generate a @SuppressWarnings("all").
Comment 2 Jan Koehnlein CLA 2011-12-08 07:21:24 EST
BTW, renaming a method to 'new' is also invalid which will be prompted by JDT:
"'new' is not a valid identifier". Do you thing we need an additional Xtend based error message for this case?
Comment 3 Jan Koehnlein CLA 2012-11-01 06:42:39 EDT
I'd like to close this as

* The issue arises only if people use either lowercase class names or uppercase method names. Who does so should be used to seeing lots of warnings...
* The issue is there. It is just not on the Xtend but on the derived Java side.
* It's only a warning, doesn't keep anyone from doing something.

If anybody objects, please reopen.