Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/redundantCast/CastInConditionalBranch.java
2018-06-19 13:18:27 +03:00

11 lines
373 B
Java

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> {}
}