Array.fill returns Unit since it's an in-place array operation.

Revised #KT-4760
This commit is contained in:
Ilya Gorbunov
2015-07-21 02:36:16 +03:00
parent 12e3542bce
commit c1975d0b2e
2 changed files with 10 additions and 20 deletions
@@ -86,11 +86,10 @@ fun specialJVM(): List<GenericFunction> {
templates add f("fill(element: T)") {
only(InvariantArraysOfObjects, ArraysOfPrimitives)
doc { "Fills original array with the provided value." }
returns { "SELF" }
returns { "Unit" }
body {
"""
Arrays.fill(this, element)
return this
"""
}
}