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

Bug 365083

Summary: [xtend] static create methods must not be able to call instance members
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: M4   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

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.