class Inference { public T getX() { return null; } void foo (String s) {} { String v2 = new Inference().getX(); foo(v2); } }