Provide asIterable also for CharSequences, Maps and Iterables.
KT-10152 Fixed
This commit is contained in:
@@ -23,18 +23,6 @@ fun arrays(): List<GenericFunction> {
|
||||
}
|
||||
}
|
||||
|
||||
templates add f("asIterable()") {
|
||||
only(ArraysOfObjects, ArraysOfPrimitives)
|
||||
doc { "Returns the Iterable that wraps the original array." }
|
||||
returns("Iterable<T>")
|
||||
body {
|
||||
"""
|
||||
return object : Iterable<T> {
|
||||
override fun iterator(): Iterator<T> = this@asIterable.iterator()
|
||||
}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
templates add pval("lastIndex") {
|
||||
only(ArraysOfObjects, ArraysOfPrimitives)
|
||||
|
||||
Reference in New Issue
Block a user