jdk-24/langtools/test/tools/javac/defaultMethods/Neg13.java
Maurizio Cimadamore a494f0ab86 8003280: Add lambda tests
Turn on lambda expression, method reference and default method support

Reviewed-by: jjg
2012-11-17 19:01:03 +00:00

19 lines
732 B
Java

/*
* @test /nodynamiccopyright/
* @summary check that default method overriding object members are flagged as error
* @compile/fail/ref=Neg13.out -XDrawDiagnostics Neg13.java
*/
interface Neg13 {
default protected Object clone() { return null; } //protected not allowed here
default boolean equals(Object obj) { return false; }
default protected void finalize() { } //protected not allowed here
default Class<?> getClass() { return null; }
default int hashCode() { return 0; }
default void notify() { }
default void notifyAll() { }
default String toString() { return null; }
default void wait() { }
default void wait(long timeout) { }
default void wait(long timeout, int nanos) { }
}