What_is_wrong_with_the_return_Pair___i_got_that_er...
# announcements
b
What_is_wrong_with_the_return_Pair___i_got_that_error___error__type_mismatch__inferred_type_is_Array_Int__but_IntArray_was_expected.js
g
Probably because your
array
has type Array<Int> instead of IntArray, those are different types Use
intArrayOf
builder function or convert Array<Int> to IntArray using
.toIntArray()
extension function
Array<Int> is like
Integer[]
in Java, IntArray is
int[]
, so second one is primitive
b
Yes you right, that was my error, thanks