Files
kotlin-fork/compiler/testData/diagnostics/tests/valueClasses/propertiesWithBackingFieldsInsideValueClass.fir.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

40 lines
566 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// !DIAGNOSTICS: -UNUSED_PARAMETER
package kotlin.jvm
annotation class JvmInline
interface A {
val goodSize: Int
}
interface B {
val badSize: Int
}
@JvmInline
value class Foo(val x: Int) : A, B {
val a0
get() = 0
val a1 = 0
var a2: Int
get() = 1
set(value) {}
var a3: Int = 0
get() = 1
set(value) {
field = value
}
override val goodSize: Int
get() = 0
override val badSize: Int = 0
lateinit var lateinitProperty: String
}