mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-01 12:50:56 +07:00
Such kind of error is induced by lambda resolution error, and in most of the cases the resolution error should be fixed first Fixes IDEA-361893 "Introduce local variable" should suggest for Function expression GitOrigin-RevId: 352d0f9040dd3e153e7d5b15ae61699b8c890194
16 lines
636 B
Java
16 lines
636 B
Java
class Test {
|
|
int field;
|
|
|
|
void foo() {
|
|
<error descr="Not a statement">i -> i + 1;</error>
|
|
<error descr="Not a statement">i -> 1 + i;</error>
|
|
<error descr="Not a statement">i -> 1 + 2 + i;</error>
|
|
<error descr="Not a statement">i -> 1 + i + 2;</error>
|
|
i -> <error descr="Operator '-' cannot be applied to 'int', 'java.lang.String'">1 - "xyz" - i</error>;
|
|
|
|
foo<error descr="Expected no arguments but found 1">(i -> ++i)</error>;
|
|
|
|
<error descr="Cannot resolve method 'bar' in 'Test'">bar</error>(i -> i += 2);
|
|
<error descr="Cannot resolve method 'bar' in 'Test'">bar</error>(i -> field += i);
|
|
}
|
|
} |