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

Bug 362695

Summary: [Xtend] Create Extensions calling an extension lead to uncompileable code
Product: [Modeling] TMF Reporter: Christian Dietrich <christian.dietrich.opensource>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: benjamin.schwertfeger, sebastian.zarnekow, sven.efftinge
Version: unspecifiedFlags: sven.efftinge: juno+
Target Milestone: M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Christian Dietrich CLA 2011-11-02 12:15:25 EDT
Build Identifier: 2.1.0

The Following Xtend class does not compile to java

class Lala {
    
	def create _this : if (s == "EOF") {doit();new A()} else {new B()} createTheStuff(String s) { 
	}
	
	def doit() {
	}
	
}

A and B are just two dummy classes.

The code that is generated is 

 Lala _Lala = Lala;
 _Lala.doit();

But i guess it should be

 Lala _Lala = Lala.this;
 _Lala.doit();

Reproducible: Always
Comment 1 Sebastian Zarnekow CLA 2011-11-07 13:53:30 EST

*** This bug has been marked as a duplicate of bug 362868 ***