mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
detect expected type by parent for nested array initializers (IDEA-139280)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
|
||||
import java.util.function.IntFunction;
|
||||
|
||||
class Test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Object[][] o = new Object[][] {{
|
||||
(IntFunction<String>) integer -> Integer.toString(integer)
|
||||
}};
|
||||
|
||||
Object[] o1 = new Object[] {
|
||||
(IntFunction<String>) integer -> Integer.toString(integer)
|
||||
};
|
||||
}
|
||||
}
|
||||
+1
@@ -39,6 +39,7 @@ public class LambdaRedundantCastTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testLambdaReturnExpressions() { doTest(); }
|
||||
public void testLambdaReturnExpressions1() { doTest(); }
|
||||
public void testPreventBadReturnTypeInReturnExpression() { doTest(); }
|
||||
public void testExpectedTypeByNestedArrayInitializer() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
doTest(BASE_PATH + "/" + getTestName(false) + ".java", true, false);
|
||||
|
||||
Reference in New Issue
Block a user