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

Bug 363842

Summary: [xtend2] Missing "this" keyword in gen. code if custom extension is used as initializer in create extensions.
Product: [Modeling] TMF Reporter: Christian Schneider <christian.schneider>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: sebastian.zarnekow
Version: 2.1.0Flags: sebastian.zarnekow: juno+
Target Milestone: M4   
Hardware: All   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Christian Schneider CLA 2011-11-15 11:08:49 EST
Build Identifier: 2.1.0.v201111010612

The transformation code

class Test {
	def Object create o: a() b() {
	}
	
	def Object a() {
		return null;
	}	
}

leads to erroneous generated Java transformation code!

Reproducible: Always

Steps to Reproduce:
1. create an Xtend Class
2. copy+paste the above snippet
3. save
4. open the generated code
Comment 1 Christian Schneider CLA 2011-11-15 11:11:01 EST
The wrong generated code looks like:

  Test _Test = Test;
  Object _a = _Test.a();

but should be

  Test _Test = Test.this;
  Object _a = _Test.a();
Comment 2 Sebastian Zarnekow CLA 2011-11-15 12:49:20 EST
Duplicate.
Comment 3 Christian Schneider CLA 2011-11-15 12:58:03 EST
(In reply to comment #2)
> Duplicate.

So this already fixed in the master branch?
Comment 4 Sebastian Zarnekow CLA 2011-11-15 13:02:30 EST
(In reply to comment #3)
> So this already fixed in the master branch?

Yes, and in the already available maintenance release 2.1.1, too.
Comment 5 Karsten Thoms CLA 2017-09-19 17:23:24 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:34:45 EDT
Closing all bugs that were set to RESOLVED before Neon.0