Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/SuperMethodsInExactCheck.java
Mikhail Pyltsin 26de6fc1df [java-highlighting] WIP IDEA-372969 Support JEP 512: Compact Source Files and Instance Main Methods
- update language levels partially
- fix tests

(cherry picked from commit 8d7b599772eda8dfd999bee9f816ec2609be4adb)


(cherry picked from commit 98a507ba78b8fc496651b5800fc3936c9c87b689)

IJ-MR-169535

GitOrigin-RevId: 898e8b4dfc303eb60da6cfff5d756304c461c424
2025-08-04 12:58:49 +00:00

22 lines
606 B
Java

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.concurrent.Callable;
class Test {
private static void <warning descr="Private method 'foo(java.lang.Runnable)' is never used">foo</warning>(Runnable runnable) {
System.out.println(runnable);
}
private static void foo(Callable<Iterator<?>> callable) {
System.out.println(callable);
}
public static void main() {
final Collection<Void> collection = new ArrayList<>();
final Iterable<Void> iterable = collection;
foo(iterable::iterator);
foo(collection::iterator);
}
}