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:
Mikhail Glukhikh
2015-10-21 12:06:21 +03:00
parent ccad435850
commit 4b6cb3ebce
18 changed files with 298 additions and 73 deletions
@@ -6397,12 +6397,48 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("classArtificialFieldInsideNested.kt")
public void testClassArtificialFieldInsideNested() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt");
doTest(fileName);
}
@TestMetadata("classFieldInsideLambda.kt")
public void testClassFieldInsideLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt");
doTest(fileName);
}
@TestMetadata("classFieldInsideLocalInSetter.kt")
public void testClassFieldInsideLocalInSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt");
doTest(fileName);
}
@TestMetadata("classFieldInsideNested.kt")
public void testClassFieldInsideNested() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideNested.kt");
doTest(fileName);
}
@TestMetadata("classObjectProperties.kt")
public void testClassObjectProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classObjectProperties.kt");
doTest(fileName);
}
@TestMetadata("classPrivateArtificialFieldInsideNested.kt")
public void testClassPrivateArtificialFieldInsideNested() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt");
doTest(fileName);
}
@TestMetadata("companionFieldInsideLambda.kt")
public void testCompanionFieldInsideLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt");
doTest(fileName);
}
@TestMetadata("field.kt")
public void testField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/field.kt");
@@ -6421,6 +6457,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("fieldInsideLambda.kt")
public void testFieldInsideLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideLambda.kt");
doTest(fileName);
}
@TestMetadata("fieldInsideNested.kt")
public void testFieldInsideNested() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideNested.kt");