KT-9717, KT-9603:

pass getter/setter-related flags to AccessorForPropertyDescriptor
This commit is contained in:
Dmitry Petrov
2015-10-26 13:48:55 +03:00
parent e83315f5bc
commit 882827bf04
14 changed files with 291 additions and 43 deletions
+11
View File
@@ -0,0 +1,11 @@
class A {
public var prop = "OK"
private set
fun test(): String {
return { prop }()
}
}
fun box(): String = A().test()
+2
View File
@@ -0,0 +1,2 @@
public var OK: String = "OK"
private set
+5
View File
@@ -0,0 +1,5 @@
object Test {
val test: String = OK
}
fun box(): String = Test.test
@@ -0,0 +1,8 @@
package a
import b.*
fun box(): String {
BB().ok()
return BB().OK
}
@@ -0,0 +1,10 @@
package b
public open class B {
public var OK: String = "OK"
protected set
}
public class BB : B() {
public fun ok(): String = OK
}
@@ -0,0 +1,14 @@
import kotlin.properties.Delegates
open class A<T : Any> {
protected var value: T by Delegates.notNull()
private set
}
class B : A<Int>()
fun box(): String {
B()
return "OK"
}
+11
View File
@@ -0,0 +1,11 @@
class A {
public var prop = "O"
private set
fun test() {
{ prop }()
}
}
// 0 INVOKESTATIC test\/A\.access\$getProp\$0
// 1 INVOKEVIRTUAL A\.getProp