/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/generics/SelfImplement.java
19 строк
544 B
Erik Joelsson
8187443: Forest Consolidation: Move files to unified layout
12 сен 2017, 20:03
12 сен 2017, 20:03
3789983
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 4725668 * @summary generics: reject implementation with incorrect return type * @author gafter * * @compile/fail/ref=SelfImplement.out -XDrawDiagnostics SelfImplement.java */ class SelfImplement { static abstract class A<T> { abstract void f(T t); public int f(Integer t) { return 3; } } static abstract class B extends A<Integer> { // error: A<Integer>.f(Integer) returning int can't implement // A<Integer>.f(Integer) returning void. } }