import java.util.*; import lombok.val; public class ValOutersWithGenerics { class Inner { } class InnerWithGenerics { } public void testOutersWithGenerics() { val foo = ""; List list = new ArrayList(); val elem = list.get(0); } public void testLocalClasses() { class Local {} val q = new Local(); } public static void test() { val outer = new ValOutersWithGenerics(); val inner1 = outer.new Inner(); val inner2 = outer.new InnerWithGenerics(); } static class SubClass extends ValOutersWithGenerics { public void testSubClassOfOutersWithGenerics() { List list = new ArrayList(); val elem = list.get(0); } } public static void loop(Map map) { for (val e : map.entrySet()) { } } }