supaham
07/23/2017, 7:57 PMfun args(args: Iterable<String>)
and i pass it an Array<String> it says array is not a subtype of iterable. What's the solution to this problem?diesieben07
07/23/2017, 7:59 PMargs
of type Array<String>
. 2 - Pass something that is actually an Iterable<String>
, e.g. List<String>
. 3 - Use Array::asIterable
.supaham
07/23/2017, 8:01 PMdiesieben07
07/23/2017, 8:03 PMIterable
you cannot pass something that's not an Iterable
. That's like passing a String
where a List
is expected. The types do not match up.supaham
07/23/2017, 8:03 PMdiesieben07
07/23/2017, 8:03 PMsupaham
07/23/2017, 8:03 PMfor
is possible during compile-timediesieben07
07/23/2017, 8:04 PMiterator
method call.supaham
07/23/2017, 8:04 PM