/** * @test /nodynamiccopyright/ * @bug 6838943 * @summary inference: javac is not handling type-variable substitution properly * @compile/fail/ref=T6838943.out -XDrawDiagnostics T6838943.java */ class T6838943 { static class A {} static class B {} static class C { void m(X x, Z z) { C> c = new C>(); c.m(new A(), new B()); //should fail } } }