mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
redundant cast: process branches of conditional expressions with respect to expected type for functional expressions (IDEA-156480)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class Test {
|
||||
{
|
||||
Object o = true ? ((Supplier<String>) () -> "") : null;
|
||||
Supplier<String> s1 = true ? ((<warning descr="Casting '() -> \"\"' to 'Supplier<String>' is redundant">Supplier<String></warning>) () -> "") : null;
|
||||
Supplier<String> s2 = true ? ((A) () -> "") : null;
|
||||
}
|
||||
|
||||
interface A extends Supplier<String> {}
|
||||
}
|
||||
Reference in New Issue
Block a user