mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
21 lines
330 B
Java
21 lines
330 B
Java
public class ViableCallable3 {
|
|
public interface Func {
|
|
int get();
|
|
}
|
|
|
|
private Func fun;
|
|
|
|
void g() {
|
|
Func f1 = () -> 1;
|
|
Func f2 = new Func() { @Override public int get() { return 2; } };
|
|
fun = (2 > 1 ? f1 : null);
|
|
h(f2);
|
|
}
|
|
|
|
void h(Func... f) {
|
|
int x;
|
|
x = fun.get();
|
|
x = f[0].get();
|
|
}
|
|
}
|