Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363842 - [xtend2] Missing "this" keyword in gen. code if custom extension is used as initializer in create extensions.
Summary: [xtend2] Missing "this" keyword in gen. code if custom extension is used as i...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.0   Edit
Hardware: All Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 11:08 EST by Christian Schneider CLA
Modified: 2017-09-19 17:34 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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