overload resolution: testdata for java 8 bug

This commit is contained in:
Anna.Kozlova
2016-03-21 15:44:45 +01:00
parent 1024c16247
commit a3aca75748
2 changed files with 18 additions and 0 deletions

View File

@@ -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;}
}

View File

@@ -216,6 +216,11 @@ public class OverloadResolutionTest extends LightDaemonAnalyzerTestCase {
doTest();
}
//java 8 error
public void testNotPotentiallyCompatibleMethodReference() throws Exception {
doTest();
}
private void doTest() {
doTest(true);
}