Generate singleton references as GET_OBJECT in nested classes

This commit is contained in:
Dmitry Petrov
2018-07-19 16:51:42 +03:00
parent 779cae7db5
commit ae0704af9c
7 changed files with 496 additions and 4 deletions
@@ -0,0 +1,28 @@
enum class MyEnum {
Z {
var counter = 0
fun foo() {}
fun bar() {
counter = 1
foo()
}
val aLambda = {
counter = 1
foo()
}
val anObject = object {
init {
counter = 1
foo()
}
fun test() {
counter = 1
foo()
}
}
}
}