``` inline infix fun <reified C>VkDevice.all...
# announcements
e
Copy code
inline infix fun <reified C>VkDevice.allocateCommandBuffers(allocateInfo: VkCommandBufferAllocateInfo): C = 
            when(C::class) {
                Array<VkCommandBuffer>::class -> Array(count) { .. } as C
                ArrayList<VkCommandBuffer>::class -> ArrayList<VkCommandBuffer>(count)  as C // error
On the second line the compiler complains:
Only classes are allowed on the left hand side of a class literal