/* * @test /nodynamiccopyright/ * @bug 6939620 * * @summary Switch to 'complex' diamond inference scheme * @author mcimadamore * @compile/fail/ref=Neg02.out Neg02.java -XDrawDiagnostics * */ class Neg02 { static class Foo { Foo(X x) {} Foo(X x, Z z) {} } void testSimple() { Foo f1 = new Foo<>(""); Foo f2 = new Foo<>(""); Foo f3 = new Foo<>(""); Foo f4 = new Foo<>(""); Foo f5 = new Foo<>(""){}; Foo f6 = new Foo<>(""){}; Foo f7 = new Foo<>(""){}; Foo f8 = new Foo<>(""){}; Foo f9 = new Foo<>("", ""); Foo f10 = new Foo<>("", ""); Foo f11 = new Foo<>("", ""); Foo f12 = new Foo<>("", ""); Foo f13 = new Foo<>("", ""){}; Foo f14 = new Foo<>("", ""){}; Foo f15 = new Foo<>("", ""){}; Foo f16 = new Foo<>("", ""){}; } void testQualified() { Foo f1 = new Neg02.Foo<>(""); Foo f2 = new Neg02.Foo<>(""); Foo f3 = new Neg02.Foo<>(""); Foo f4 = new Neg02.Foo<>(""); Foo f5 = new Neg02.Foo<>(""){}; Foo f6 = new Neg02.Foo<>(""){}; Foo f7 = new Neg02.Foo<>(""){}; Foo f8 = new Neg02.Foo<>(""){}; Foo f9 = new Neg02.Foo<>("", ""); Foo f10 = new Neg02.Foo<>("", ""); Foo f11 = new Neg02.Foo<>("", ""); Foo f12 = new Neg02.Foo<>("", ""); Foo f13 = new Neg02.Foo<>("", ""){}; Foo f14 = new Neg02.Foo<>("", ""){}; Foo f15 = new Neg02.Foo<>("", ""){}; Foo f16 = new Neg02.Foo<>("", ""){}; } }