Files
kotlin-fork/libraries/tools/kotlinp/testData/Properties.kt
T
pyos 2fe7cf27ad kotlinp: use JVM_IR backend for compiling tests
Also, test optimized delegated properties.
2021-07-12 22:38:45 +02:00

15 lines
384 B
Kotlin
Vendored

class C(val constructorParam: String = "") {
val getterOnlyVal: Double get() = 0.0
var accessorOnlyVar: Int
get() = 1
set(value) {}
var withBackingField: String = "42"
val <T : Number> T.delegated: List<Nothing> by null
val withOptimizedDelegate by C::getterOnlyVal
operator fun Nothing?.getValue(x: Any?, y: Any?) = emptyList<Nothing>()
}