You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use lombok.val to iterate over a map with a inner class of a generic outer;
a sample file is inlined here:
package pkg;
import java.util.Map;
public class Thing<T> {
private final Map<String, Outer<T>.Inner> map = null;
private void loop() {
for (lombok.val entry : map.entrySet()) {}
}
}
class Outer<T> { class Inner {} }
What is the expected output? What do you see instead?
Eclipse and delombok both produce an invalid substitute type for val.
Delombok produces the for-loop as:
for (final java.util.Map.Entry<java.lang.String, pkg.Outer.Inner> entry :
map.entrySet()) { }
Eclipse says: Type mismatch: cannot convert from element type
Map.Entry<String,Outer<T>.Inner> to Map.Entry<String,Outer.Inner>
I expect second the Map.Entry generic parameters to show up as
pkg.Outer<T>.Inner, not pkg.Outer.Inner.
What version of the product are you using? On what operating system?
Eclipse SDK Version: 3.7.1 Build id: M20110909-1335
Lombok v0.10.8 "Burning Emu" is installed. https://projectlombok.org/
java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.04.3)
Migrated from Google Code (issue 343)
The text was updated successfully, but these errors were encountered: