Array.fill returns Unit since it's an in-place array operation.
Revised #KT-4760
This commit is contained in:
@@ -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
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user