/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/resolve/MethodAmbiguityCrash1.java
23 строки
549 B
Archie Cobbs
8337980: Javac allows invocation of an inherited instance method from a static method
09 окт 2024, 19:03
09 окт 2024, 19:03
38c1d65
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 8337980 * @summary Test compiler crash due to failure to resolve method ambiguity * @compile/fail/ref=MethodAmbiguityCrash1.out -XDrawDiagnostics MethodAmbiguityCrash1.java */ public class MethodAmbiguityCrash1 { public interface A { int op(); } public abstract static class B { abstract int op(); } public abstract static class C extends B implements A { public static int test() { return op(); // compile should fail here } } }