mc
08/04/2017, 1:35 PMsliceArray()
behaves a bit weird when out-of-bounds range is passed? Example: arrayOf("a", "b", "c").sliceArray(0 .. 3).forEach { println(it.toUpperCase()) }
kingsley
08/04/2017, 1:50 PMsliceArray
is using copyofRange
which simply fills the extra indices with null
.
But I’d expect sliceArray
itself to throw an exception if the bounds are exceeded.
You should file an issue kotl.in/issueilya.gorbunov
08/04/2017, 3:00 PM