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

Bug 342184

Summary: [xtend2] problems with nested types in FOR-loops
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: unspecifiedFlags: sebastian.zarnekow: indigo+
Target Milestone: M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Moritz Eysholdt CLA 2011-04-07 11:36:23 EDT
the xtend2-code

------
foo(Map<String, String> m) { '''«FOR e:m.entrySet»«ENDFOR»''' }
------

gets compiled to

------
public StringConcatenation foo(final Map<String,String> m) {
    StringConcatenation builder = new StringConcatenation();
    {
      Set<Entry<String,String>> _entrySet = m.entrySet();
      for(java.util.Map$Entry<java.lang.String,java.lang.String> e : _entrySet) {
      }
    }
    return builder;
  }
-------

In there, "java.util.Map$Entry" causes a Java compile error. It needs to be "java.util.Map.Entry"
Comment 1 Sven Efftinge CLA 2011-04-08 03:19:51 EDT
pushed to master
Comment 2 Karsten Thoms CLA 2017-09-19 17:46:41 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:57:44 EDT
Closing all bugs that were set to RESOLVED before Neon.0