mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
check context for functional expressions once (IDEA-159362)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
public class Test {
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
class Test {
|
||||
{
|
||||
if (<error descr="Method reference expression is not expected here">Test::length instanceof String</error>) {
|
||||
if (<error descr="Method reference expression is not expected here">Test::length</error> instanceof String) {
|
||||
}
|
||||
bar(Test::length);
|
||||
}
|
||||
@@ -14,4 +18,10 @@ public class Test {
|
||||
interface Bar {
|
||||
Integer _(String s);
|
||||
}
|
||||
|
||||
void f() throws IOException {
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(""))) {
|
||||
for (String line : <error descr="Method reference expression is not expected here">reader::lines</error>) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user