mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-15 18:53:43 +07:00
481bc252f3
(cherry picked from commit d2cbf3f2833104c3a0381059b0d6ef8ac0b3c94c)
20 lines
434 B
Java
20 lines
434 B
Java
class NoLambda {
|
|
interface I<T> {
|
|
void f(T t);
|
|
}
|
|
|
|
<Z> void bar(I<Z> iz) {
|
|
}
|
|
|
|
void bazz() {
|
|
bar(null);
|
|
bar((z)-> {System.out.println();});
|
|
}
|
|
|
|
static <T> T id(T i2) {return i2;}
|
|
|
|
{
|
|
id(<error descr="Target type of a lambda conversion must be an interface">() -> {System.out.println("hi");}</error>);
|
|
NoLambda.<Runnable>id(() -> {System.out.println("hi");});
|
|
}
|
|
} |