Files
Tagir Valeev cc643a5ae4 [java-highlighting] More control-flow-related stuff migrated
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 3c292fdf4869e6d13c16fabbf42e2055ea54f724
2025-02-06 10:35:32 +00:00

42 lines
857 B
Java

import java.util.*;
class Test {
interface IntFunction {
int m(int i);
}
private final int idx;
private final int idx2 = Test.this.idx + 1;
private final IntFunction multiply = i -> i * Test.this.idx;
private final int idx3 = <error descr="Variable 'idx' might not have been initialized">this.idx</error> + 1;
private final IntFunction multiply2 = i -> i * <error descr="Variable 'idx' might not have been initialized">this.idx</error>;
public Test(int idx) {
this.idx = idx;
}
}
class C {
interface Simplest {
void m();
}
void use(Simplest s) { }
interface IntParser {
int parse(String s);
}
void test() {
Simplest simplest = () -> { };
use(() -> { });
IntParser intParser = (String s) -> Integer.parseInt(s);
}
Runnable foo() {
return () -> { System.out.println("foo"); };
}
}