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

Bug 352538

Summary: [Xtend2] flatten and arrays
Product: [Modeling] TMF Reporter: Christian Dietrich <christian.dietrich.opensource>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: unspecifiedFlags: sebastian.zarnekow: indigo+
Target Milestone: SR1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Christian Dietrich CLA 2011-07-20 03:58:20 EDT
Build Identifier: 

This is valid Xend2 code

"a,b,c".split(",").flatten

This leads to a compile error in the gererated Java Code

I Know that Xtend2 dislikes arrays, but it should work or i should get an error in the Xtend file.

Reproducible: Always
Comment 1 Sebastian Zarnekow CLA 2011-07-21 11:04:43 EDT
The inference issue itself was already solved for SR1. However, flatten is defined for Iterable<? extends Iterable<? extends T>> and String[] / List<String> does not match the type constraint. A validation rule is missing.
Comment 2 Sebastian Zarnekow CLA 2011-07-21 16:19:09 EDT
Pushed to master.
Comment 3 Karsten Thoms CLA 2017-09-19 18:07:34 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 18:17:10 EDT
Closing all bugs that were set to RESOLVED before Neon.0