mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
method refs: turn highlighting on; check valid context
This commit is contained in:
+2
-2
@@ -22,7 +22,7 @@ class C {
|
||||
void use(Simplest s) { }
|
||||
|
||||
void test() {
|
||||
Simplest simplest = <weak_warning descr="Method references type check is not yet implemented">this::simplest</weak_warning>;
|
||||
use(<weak_warning descr="Method references type check is not yet implemented">this::simplest</weak_warning>);
|
||||
Simplest simplest = this::simplest;
|
||||
use(this::simplest);
|
||||
}
|
||||
}
|
||||
+17
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user