Write proper enclosingMethod/enclosingClass information to bytecode
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
class ClassObject {
|
||||
void accessToClassObject() {
|
||||
WithClassObject.object.$instance.foo();
|
||||
WithClassObject.object.$instance.getValue();
|
||||
WithClassObject.object.$instance.getValueWithGetter();
|
||||
WithClassObject.object.$instance.getVariable();
|
||||
WithClassObject.object.$instance.setVariable(0);
|
||||
WithClassObject.object.$instance.getVariableWithAccessors();
|
||||
WithClassObject.object.$instance.setVariableWithAccessors(0);
|
||||
}
|
||||
|
||||
void accessToPackageObject() {
|
||||
PackageInner.$instance.foo();
|
||||
PackageInner.$instance.getValue();
|
||||
}
|
||||
|
||||
void accessToInnerClass() {
|
||||
new WithClassObject.MyInner().foo();
|
||||
new WithClassObject.MyInner().getValue();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
class WithClassObject {
|
||||
class object {
|
||||
fun foo() {}
|
||||
|
||||
val value: Int = 0
|
||||
val valueWithGetter: Int
|
||||
get() = 1
|
||||
|
||||
var variable: Int = 0
|
||||
var variableWithAccessors: Int
|
||||
get() = 0
|
||||
set(v) {}
|
||||
|
||||
}
|
||||
|
||||
class MyInner {
|
||||
fun foo() {}
|
||||
val value: Int = 0
|
||||
}
|
||||
}
|
||||
|
||||
object PackageInner {
|
||||
fun foo() {}
|
||||
val value: Int = 0
|
||||
}
|
||||
Reference in New Issue
Block a user