Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365083 - [xtend] static create methods must not be able to call instance members
Summary: [xtend] static create methods must not be able to call instance members
Status: CLOSED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 11:08 EST by Moritz Eysholdt CLA
Modified: 2011-11-30 09:44 EST (History)
0 users

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-29 11:08:26 EST
Example:

-----
class foo  {
	int x
	def s() {}

	def static create new MySub() newFoo() {
		s()
		x =2
	}
}
-------

the access to "x" and to "s()" both need to be flagged as an error since they're not available in static context. Currently, there is no error.
Comment 1 Moritz Eysholdt CLA 2011-11-30 09:44:25 EST
Wont't fix since we won't allow static create methods. See bug 365082.