Fix for KT-6722
#KT-6722 Fixed
This commit is contained in:
@@ -1254,7 +1254,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
for (KtDeclaration declaration : myClass.getDeclarations()) {
|
for (KtDeclaration declaration : myClass.getDeclarations()) {
|
||||||
if (declaration instanceof KtProperty) {
|
if (declaration instanceof KtProperty) {
|
||||||
KtProperty property = (KtProperty) declaration;
|
KtProperty property = (KtProperty) declaration;
|
||||||
KtExpression initializer = property.getInitializer();
|
KtExpression initializer = property.getDelegateExpressionOrInitializer();
|
||||||
if (initializer != null) {
|
if (initializer != null) {
|
||||||
initializer.accept(visitor);
|
initializer.accept(visitor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
interface T {
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val a = "OK"
|
||||||
|
val t = object : T {
|
||||||
|
val foo by lazy {
|
||||||
|
a
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return t.foo
|
||||||
|
}
|
||||||
+6
@@ -1456,6 +1456,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt6722.kt")
|
||||||
|
public void testKt6722() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/delegatedProperty/kt6722.kt");
|
||||||
|
doTestWithStdlib(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("stackOverflowOnCallFromGetValue.kt")
|
@TestMetadata("stackOverflowOnCallFromGetValue.kt")
|
||||||
public void testStackOverflowOnCallFromGetValue() throws Exception {
|
public void testStackOverflowOnCallFromGetValue() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/delegatedProperty/stackOverflowOnCallFromGetValue.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/delegatedProperty/stackOverflowOnCallFromGetValue.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user