Make Array.size() a function instead of a property
Also add a deprecated extension property to help migration. This is done to unify getting size of arrays and collections
This commit is contained in:
@@ -48,7 +48,7 @@ fun <T> foreignKotlinClass(jClass: Class<T>): KClassImpl<T> {
|
||||
|
||||
// This is the most unlikely case: we found a cached array of references of length at least 2 (can't be 1 because
|
||||
// the single element would be cached instead), and none of those classes is the one we're looking for
|
||||
val size = cached.size
|
||||
val size = cached.size()
|
||||
// Don't use Array constructor because it creates a lambda
|
||||
val newArray = arrayOfNulls<WeakReference<KClassImpl<*>>>(size + 1)
|
||||
// Don't use Arrays.copyOf because it works reflectively
|
||||
|
||||
Reference in New Issue
Block a user