mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
overload resolution: testdata for java 8 bug
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
|
||||
import java.io.File;
|
||||
|
||||
class Main {
|
||||
|
||||
private static File[] <warning descr="Private method 'scanFolder(java.io.File)' is never used">scanFolder</warning>(File javasFolder) {
|
||||
return javasFolder.listFiles(Main::checkForJdk);
|
||||
}
|
||||
|
||||
public static boolean checkForJdk(String <warning descr="Parameter 'homePath' is never used">homePath</warning>) {return false;}
|
||||
public static boolean checkForJdk(File homePath) {return false;}
|
||||
|
||||
}
|
||||
@@ -216,6 +216,11 @@ public class OverloadResolutionTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
//java 8 error
|
||||
public void testNotPotentiallyCompatibleMethodReference() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user