Generate synthetic getter & setter descriptors for static properties in Java classes

(recognized as properties defined in classes without dispatchReceiver and extensionReceiver).
Fix 'when' generation for else-only case.
This commit is contained in:
Dmitry Petrov
2016-08-29 20:18:42 +03:00
committed by Dmitry Petrov
parent 05b9eda809
commit b3f605c4c4
12 changed files with 263 additions and 50 deletions
@@ -1,3 +1,25 @@
fun test1() {
// System.out.println("test1")
fun testFun() {
System.out.println("testFun")
}
var testProp: Any
get() {
System.out.println("testProp/get")
return 42
}
set(value) {
System.out.println("testProp/set")
}
class TestClass {
val test = when {
else -> {
System.out.println("TestClass/test")
42
}
}
init {
System.out.println("TestClass/init")
}
}