Generate singleton references as GET_OBJECT in nested classes
This commit is contained in:
+28
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user