Transform *Array.size to properties

This commit is contained in:
Denis Zharkov
2015-10-14 13:56:18 +03:00
parent b050324869
commit bd37a10677
38 changed files with 147 additions and 107 deletions
@@ -350,7 +350,7 @@ public class PackageGenTest extends CodegenTestCase {
}
public void testArraySize() throws Exception {
loadText("fun foo(a: Array<Int>) = a.size()");
loadText("fun foo(a: Array<Int>) = a.size");
Method main = generateFunction();
Object[] args = new Object[] { new Integer[4] };
int result = (Integer) main.invoke(null, args);
@@ -358,7 +358,7 @@ public class PackageGenTest extends CodegenTestCase {
}
public void testIntArraySize() throws Exception {
loadText("fun foo(a: IntArray) = a.size()");
loadText("fun foo(a: IntArray) = a.size");
Method main = generateFunction();
Object[] args = new Object[] { new int[4] };
int result = (Integer) main.invoke(null, args);