Implement asList, slice & sliceArray extension functions for UArrays
This commit is contained in:
committed by
Ilya Gorbunov
parent
114736c09b
commit
fc85781bfc
@@ -454,8 +454,7 @@ class UnsignedArrayGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIn
|
||||
}
|
||||
|
||||
override fun containsAll(elements: Collection<$elementType>): Boolean {
|
||||
if ((elements as Collection<Any?>).any { it as? $elementType == null }) return false
|
||||
return elements.all { storage.contains(it.to$storageElementType()) }
|
||||
return (elements as Collection<*>).all { it is $elementType && storage.contains(it.to$storageElementType()) }
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean = this.storage.size == 0"""
|
||||
|
||||
Reference in New Issue
Block a user