Stable accessors names

This commit is contained in:
Michael Bogdanov
2015-10-15 17:25:49 +03:00
committed by Max Kammerer
parent 7851abd535
commit 01864801f3
18 changed files with 263 additions and 57 deletions
@@ -0,0 +1,32 @@
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) {}
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
}()
}
}