method refs: restore error on invalid array creation

This commit is contained in:
Anna Kozlova
2014-02-21 21:47:03 +01:00
parent 07de1517e5
commit 0f39a4ca18
3 changed files with 20 additions and 11 deletions
@@ -0,0 +1,11 @@
class Test {
interface I {
Object m();
}
void m(I i) {}
{
m<error descr="'m(Test.I)' in 'Test' cannot be applied to '(<method reference>)'">(String[]::new)</error>;
}
}
@@ -165,6 +165,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testIncorrectArrayCreationSignature() throws Exception {
doTest();
}
private void doTest() {
doTest(false);
}