A new kind of synthetic accessors for backing fields, if accessed inside lambda / object literal / local class #KT-9657 Fixed
A set of tests provided Also #KT-4867 Fixed Also #KT-8750 Fixed Slight codegen refactoring
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
abstract class Your {
|
||||
abstract val your: String
|
||||
|
||||
fun foo() = your
|
||||
}
|
||||
|
||||
class My {
|
||||
val my: String = "O"
|
||||
get() = object : Your() {
|
||||
override val your = field
|
||||
}.foo() + "K"
|
||||
}
|
||||
|
||||
fun box() = My().my
|
||||
Reference in New Issue
Block a user