I\'m not sure what the difference between an IntArray and an Array is in Kotlin and why I can\'t used them interchangeably:
IntArray
Array
It is worth noting that using the spread (*) operator on a vararg will return an IntArray. If you need an Array, you can convert your IntArray using .toTypedArray().
*
vararg
.toTypedArray()