Files
kotlin/compiler/testData/codegen/properties/privateClassPropertyAccessors.kt
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00

32 lines
690 B
Kotlin

class C {
// All these properties should have corresponding accessors
private val valWithGet: String
get() = ""
private var varWithGetSet: Int
get() = 0
set(value) {}
private var delegated: Int by Delegate
private var String.extension: String
get() = this
set(value) {}
default object {
private val classObjectVal: Long
get() = 1L
}
// This property should not have accessors
private var varNoAccessors = 0L
get set
}
object Delegate {
fun get(x: C, p: PropertyMetadata) = throw AssertionError()
fun set(x: C, p: PropertyMetadata, value: Int) = throw AssertionError()
}