void () { doTest(""" class X { private int /*Method 'foo()'is only used from an anonymous class derived from 'Inner'*/foo/**/() {return 5;} \s void test() { new Inner(1) { int x = foo(); }; } \s static class Inner { Inner(int x) {}} }"""); }