KT-1589: Array<T>(size) renamed to arrayOfNulls
This commit is contained in:
@@ -43,7 +43,7 @@ public class ArrayGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testCreateMultiIntNullable () throws Exception {
|
||||
loadText("fun foo() = Array<Array<Int?>> (5, { Array<Int?>(it) })");
|
||||
loadText("fun foo() = Array<Array<Int?>> (5, { arrayOfNulls<Int>(it) })");
|
||||
Method foo = generateFunction();
|
||||
Integer[][] invoke = (Integer[][]) foo.invoke(null);
|
||||
assertEquals(invoke[2].length, 2);
|
||||
|
||||
@@ -398,7 +398,7 @@ public class NamespaceGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testArrayNewNullable() throws Exception {
|
||||
loadText("fun foo() = Array<Int?>(4)");
|
||||
loadText("fun foo() = arrayOfNulls<Int>(4)");
|
||||
// System.out.println(generateToText());
|
||||
final Method main = generateFunction();
|
||||
Integer[] result = (Integer[]) main.invoke(null);
|
||||
|
||||
Reference in New Issue
Block a user