/* * @test /nodynamiccopyright/ * @bug 8334466 * @summary Ambiguous method call with generics may cause FunctionDescriptorLookupError * @compile/fail/ref=CrashWithFunctionDescriptorLookupErrorTest.out -XDrawDiagnostics CrashWithFunctionDescriptorLookupErrorTest.java */ import java.util.List; class CrashWithFunctionDescriptorLookupErrorTest { void m() { List list = List.of(new X()); test(list.get(0)); } void test(A a) { } void test(B b) { } interface A> { T a(); } interface B> { T b(); } class X implements A, B { public X a() { return null; } public X b() { return null; } } }