John
11/08/2019, 12:14 PMBurkhard
11/08/2019, 12:25 PMval array = intArrayOf(1,2,3)
foo(*array)
// decompiled
int[] a = new int[]{1, 2, 3, 4, 5};
foo(Arrays.copyOf(a, a.length));
In case you have something like foo(*array, 4)
the code gets a bit more complicated, but it still creates a new array with all the elements of array, but now it also adds 4.Burkhard
11/08/2019, 12:26 PM