class Test { static class C { U u; C(C other) { u = other.u; } C(U u) { this.u = u; } } static C foo(C c) { return new C(c); } { C c = foo(new C<>(foo(new C<>(foo(new C<>(foo(new C<>(foo(null))))))))); } }