diff --git a/java/ql/test/library-tests/functional-interfaces/Test.java b/java/ql/test/library-tests/functional-interfaces/Test.java index ad0d4c079b42..a07881e07be6 100644 --- a/java/ql/test/library-tests/functional-interfaces/Test.java +++ b/java/ql/test/library-tests/functional-interfaces/Test.java @@ -21,9 +21,19 @@ interface NotFunctional { interface FunctionalWithObjectMethods { int f(); + // Not actually abstract; implementation comes from Object + boolean equals(Object obj); + int hashCode(); String toString(); + } - int hashCode(); + interface NotFunctionalWithObjectMethods { + int f(); + + // Increases their visibility from `protected` to `public`; this requires subclasses to implement them + // See also JLS section "Functional Interfaces" which explicitly covers this + Object clone(); + void finalize(); } }