Files
kotlin-fork/compiler/testData/diagnostics/tests/valueClasses/valueClassImplementsCollection.kt
T
Ilmir Usmanov 129de76288 Value classes: Generate @JvmInline annotation for inline classes
but not for value classes.
Since inline classes and value classes share the same flag, we use
presence of the annotation to distinguish them.
2020-12-01 23:45:47 +01:00

20 lines
504 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +InlineClasses
package kotlin.jvm
annotation class JvmInline
@JvmInline
value class UInt(val x: Int)
@JvmInline
value class UIntArray(private val storage: IntArray) : Collection<UInt> {
public override val size: Int get() = storage.size
override operator fun iterator() = TODO()
override fun contains(element: UInt): Boolean = TODO()
override fun containsAll(elements: Collection<UInt>): Boolean = TODO()
override fun isEmpty(): Boolean = TODO()
}