class A { A(T... t) { } { A a = new A<>("a", "b"); foo(new A<>("", "")); bar(new A<>("", "")); bar(new A<>(get())); bar(new A<>(get( ), "")); } void foo(A s) {} void bar(A s) {} K get() {return null;} A s(M... m) { return null; } { bar(s(get())); bar(s(get(), "")); } } class B { public B(T entity) {} public B(T entity, Integer... error){} void foo(final Integer generalError){ B value = new B<>("", generalError); } }