| Summary: | [xbase] problem with type inference | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Moritz Eysholdt <moritz.eysholdt> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow, sven.efftinge |
| Version: | unspecified | Flags: | sven.efftinge:
indigo+
|
| Target Milestone: | M7 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
Pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
the Xten2-code ------ package x class Y { a(java.util.List<String> s) { s.map(e| newArrayList(e)).flatten } } ------ gets compiled to ------ public class Y { private final Y _this = this; public Iterable<? extends Object> a(final List<String> s) { final Function1<String,ArrayList<String>> function = new Function1<String,ArrayList<String>>() { public ArrayList<String> apply(String e) { ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList(e); return _newArrayList; } }; List<ArrayList<String>> _map = ListExtensions.<String, ArrayList<String>>map(s, function); Iterable<?> _flatten = IterableExtensions.flatten(_map); return _flatten; } } ------ I'd expect the return type to be Iterable<String> (and not Iterable<? extends Object>)