Community
Participate
Working Groups
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.
A solution would be to avoid generation of a synthetic local variable.