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

Bug 351809

Summary: [Xbase] Code generation for CollectionExtensions.operator_add(Collection, Iterable) binds wrong type
Product: [Modeling] TMF Reporter: Jendrik Johannes <jendrik.johannes>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: SR1   
Hardware: All   
OS: All   
Whiteboard:

Description Jendrik Johannes CLA 2011-07-12 06:06:41 EDT
val l = new ArrayList<JvmField>();
  new ArrayList<JvmMember>() += l;

compiles to (with Java compilation error):

  ArrayList<JvmField> _arrayList = new ArrayList<JvmField>();
  final ArrayList<JvmField> l = _arrayList;
  ArrayList<JvmMember> _arrayList_1 = new ArrayList<JvmMember>();
  boolean _operator_add = CollectionExtensions.
    <JvmField>operator_add(_arrayList_1, l);

but last line should be (I think):

  boolean _operator_add = CollectionExtensions.
    <JvmMember>operator_add(_arrayList_1, l);

or:

  boolean _operator_add = CollectionExtensions.
    operator_add(_arrayList_1, l);
Comment 1 Sebastian Zarnekow CLA 2011-07-15 10:23:51 EDT
Pushed to master.
Comment 2 Karsten Thoms CLA 2017-09-19 16:59:03 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:10:31 EDT
Closing all bugs that were set to RESOLVED before Neon.0