method refs: turn highlighting on; check valid context

This commit is contained in:
anna
2012-09-25 16:27:46 +02:00
parent d2af36382c
commit a617afe1fe
4 changed files with 54 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
public class Test {
{
if (<error descr="Method reference expression is not expected here">Test::length instanceof String</error>) {
}
bar(Test::length);
}
public static Integer length(String s) {
return s.length();
}
public static void bar(Bar bar) {}
interface Bar {
Integer _(String s);
}
}