/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/defaultMethods/Neg03.java
38 строк
932 B
Erik Joelsson
8187443: Forest Consolidation: Move files to unified layout
12 сен 2017, 20:03
12 сен 2017, 20:03
3789983
Код
Авторство
О чём код?
/* @test /nodynamiccopyright/ * @bug 7192246 * @summary check that re-abstraction works properly * @compile/fail/ref=Neg03.out -XDrawDiagnostics Neg03.java */ class Neg03 { interface A { default void m() { Neg03.one(this); } } interface B { default void m() { Neg03.two(this); } } interface C extends A, B { default void m() { Neg03.one(this); } } static class X implements C, A { } //ok - ignore extraneous remix of A interface D extends A, B { void m(); // ok - m() is not reabstracted! } static class Y implements D, A { } // invalid - abstract D.m() interface E extends A { void m(); // reabstraction of m() } static class W implements D, E { } // invalid - abstracts D.m()/E.m() static class Z implements D, A, B { } // invalid - abstract D.m() static void one(Object a) { } static void two(Object a) { } }