/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/resolve/MethodAmbiguityCrash2.java
26 строк
579 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=MethodAmbiguityCrash2.out -XDrawDiagnostics MethodAmbiguityCrash2.java */ public class MethodAmbiguityCrash2 { public interface A { int op(); } public abstract static class B { public abstract int op(); } public abstract static class C extends B implements A { public C(int x) { } public C() { this(op()); // compile should fail here } } }