1 2 3 4 5 6 7 8 9 10 11 12 13 14
class Outer { public class Inner {} } public class pr104024 { public void varargs(Object... varargs) {} public void test() { Outer.Inner inner = new Outer().new Inner(); varargs(inner); // works varargs(new Outer().new Inner()); // crashes } }