mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 19:29:30 +07:00
redundant cast: do not raise if result in bad return type in lambda expression (IDEA-138927)
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
public void filterByBoolean(Stream<Object[]> stream) {
|
||||
stream.filter(it -> (Boolean) it[0]);
|
||||
}
|
||||
}
|
||||
+2
@@ -38,6 +38,8 @@ public class LambdaRedundantCastTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testSer() { doTest(); }
|
||||
public void testLambdaReturnExpressions() { doTest(); }
|
||||
public void testLambdaReturnExpressions1() { doTest(); }
|
||||
public void testPreventBadReturnTypeInReturnExpression() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
doTest(BASE_PATH + "/" + getTestName(false) + ".java", true, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user