4b6cb3ebce
A set of tests provided Also #KT-4867 Fixed Also #KT-8750 Fixed Slight codegen refactoring
38 lines
737 B
Kotlin
Vendored
38 lines
737 B
Kotlin
Vendored
class A {
|
|
|
|
private var foo = 1;
|
|
|
|
fun `access$getFoo$p`(a: A): Int = 1
|
|
fun `access$setFoo$p`(a: A, d: Int) {}
|
|
|
|
//companion backing field accessors
|
|
fun `access$getFoo$cp`(): Int = 1
|
|
fun `access$setFoo$cp`(d: Int) {}
|
|
|
|
val bar = 0
|
|
get() = { field }()
|
|
|
|
//synthetic field convention accessor
|
|
fun `access$getBar$lp`(a: A): Int = 7
|
|
|
|
companion object {
|
|
private var foo = 1;
|
|
|
|
fun test() {
|
|
{
|
|
foo = 2;
|
|
foo
|
|
}()
|
|
}
|
|
|
|
fun `access$getFoo$p`(p: A.Companion): Int = 1
|
|
fun `access$setFoo$p`(p: A.Companion, d: Int) {}
|
|
}
|
|
|
|
fun test() {
|
|
{
|
|
foo = 2;
|
|
foo + bar
|
|
}()
|
|
}
|
|
} |