KT-15363 Collection Builders
Added container builders for lists, sets, and maps. The new experimental type inference only works for the simple builders with a single generic type. The versions with nullability and the maps still require explicit specification of the types. Obviously explicit specification is required for all users who are not using the new experimental inference. Improving the type inference is something that should be done separately and many things – including these builders – will benefit from it, however, this is not a blocker for these builders in my opinion.
This commit is contained in:
committed by
Ilya Gorbunov
parent
fa811c731f
commit
bf9d3d87a6
@@ -182,3 +182,10 @@ internal actual fun checkCountOverflow(count: Int): Int {
|
||||
return count
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* JS map and set implementations do not make use of capacities or load factors.
|
||||
*/
|
||||
@PublishedApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun mapCapacity(expectedSize: Int) = expectedSize
|
||||
|
||||
Reference in New Issue
Block a user