mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 15:50:52 +07:00
isAssignable check may fail otherwise GitOrigin-RevId: d02c9d50645a2bbb0e957f077a4a66813c94afd6
15 lines
410 B
Java
15 lines
410 B
Java
|
|
import java.util.function.Function;
|
|
|
|
abstract class MyTest {
|
|
public <T> T m() {
|
|
//noinspection unchecked
|
|
return (T)(Function)t -> t;
|
|
}
|
|
|
|
public Function m1() {
|
|
//noinspection unchecked
|
|
return (<warning descr="Casting '(Function)t -> {...}' to 'Function' is redundant">Function</warning>)(<warning descr="Casting 't -> {...}' to 'Function' is redundant">Function</warning>)t -> t;
|
|
}
|
|
}
|