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

Bug 365057

Summary: [Xtend] static member access must be fully qualified if local fields have the same name as the class
Product: [Tools] Xtend Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: BacklogAssignee: Project Inbox <xtend-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: btickets, sven.efftinge
Version: 2.2.0Flags: moritz.eysholdt: juno+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Moritz Eysholdt CLA 2011-11-29 09:26:02 EST
---- Xtend ---
class bar  {
	static int bar = 1
	int i = bar
}
-------------

compiles to

----- Java ------
public class bar {
  private static int bar = 1;
  
  private int i = bar.bar;
}
-----------------

In " private int i = bar.bar;" 
I expect "somepackage.bar.bar"  instead of "bar.bar". 

This is a compile error since the name of local member field shadows the name of the class.
Comment 1 Sven Efftinge CLA 2011-11-29 10:17:39 EST
not M4