Inline simple lambdas in bytecode fast paths
This commit is contained in:
1 parent
10fa4de4fa
commit
f72cdfdf83
14 files changed
+1229
-55
No files matched your search
@@ -434,7 +434,7 @@ fun List<T>.sort(): void {
|
||||
|
||||
/*
|
||||
Build a new list of `size` elements by calling `block(index)` for each index.
|
||||
`capacity` less size is ignored (size will be used as capacity).
|
||||
`capacity` less than size is ignored (size will be used as capacity).
|
||||
*/
|
||||
static fun List<T>.fill(size: Int, capacity = -1, block: (Int)->T): List<T> {
|
||||
require(size >= 0, "size must not be negative")
|
||||
|
||||
Reference in new issue
Block a user