// ignore import java.util.*; import lombok.val; public class ValAnonymousSubclassWithGenerics { Object object = new Object(){ void foo() { val j = 1; } }; void bar() { val k = super.hashCode(); int x = k; } java.util.List names = new java.util.ArrayList() { public String get(int i) { val result = super.get(i); return result; } }; }