| Summary: | [Xbase][generator] nested upperbounds | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Flags: | sven.efftinge:
juno+
|
| Version: | 2.4.3 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
A solution would be to avoid generation of a synthetic local variable. |
given a 'map' of type Map<String,? extends Object>, it's not possible to write the following in Java : Set<Entry<String, ? extends Object>> entrySet = mp.entrySet(); JDT suggests : Set<?> entrySet = map.entrySet() Xtend allows it, which results in invalid Java code (that's related to another bug, regarding cast conversions) But in Java it's ok to write : for (Entry<String, ? extends Object> x : mp.entrySet()) { However, the Xtend compiler creates a local variable Set<Entry<String, ? extends Object>> _entrySet = mp.entrySet(); which renders the code invalid.