ClassObject instance field refactoring
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
WARNING: $TESTDATA_DIR$/wrongAbiVersion.kt: (3, 9) Parameter 'x' is never used
|
||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/wrong/WrongPackage.java: (3, 1) Class 'wrong.WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 2
|
||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/ClassWithWrongAbiVersion.java: (3, 1) Class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 2
|
||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/wrong/WrongPackage.java: (3, 1) Class 'wrong.WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 3
|
||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/ClassWithWrongAbiVersion.java: (3, 1) Class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 3
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
var global = 0;
|
||||
|
||||
class C {
|
||||
class object {
|
||||
{
|
||||
global = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (global != 0) {
|
||||
return "fail1: global = $global"
|
||||
}
|
||||
|
||||
val c = C()
|
||||
if (global == 1) return "OK" else return "fail2: global = $global"
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
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);
|
||||
WithClassObject.object$.foo();
|
||||
WithClassObject.object$.getValue();
|
||||
WithClassObject.object$.getValueWithGetter();
|
||||
WithClassObject.object$.getVariable();
|
||||
WithClassObject.object$.setVariable(0);
|
||||
WithClassObject.object$.getVariableWithAccessors();
|
||||
WithClassObject.object$.setVariableWithAccessors(0);
|
||||
}
|
||||
|
||||
void accessToPackageObject() {
|
||||
PackageInner.$instance.foo();
|
||||
PackageInner.$instance.getValue();
|
||||
PackageInner.instance$.foo();
|
||||
PackageInner.instance$.getValue();
|
||||
}
|
||||
|
||||
void accessToInnerClass() {
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user