diff --git a/idea/testData/resolve/partialBodyResolve/PropertyByDelegate.dump b/idea/testData/resolve/partialBodyResolve/PropertyByDelegate.dump new file mode 100644 index 00000000000..269b3f9c1ec --- /dev/null +++ b/idea/testData/resolve/partialBodyResolve/PropertyByDelegate.dump @@ -0,0 +1,13 @@ +Resolve target: fun g(): kotlin.Int +---------------------------------------------- +import kotlin.properties.Delegates + +val prop: Int by Delegates.lazy { + // STATEMENT DELETED: print(1) + val v = f() + g() + v + 1 +} + +fun f(): Int = 1 +fun g(): Int = 2 diff --git a/idea/testData/resolve/partialBodyResolve/PropertyByDelegate.kt b/idea/testData/resolve/partialBodyResolve/PropertyByDelegate.kt new file mode 100644 index 00000000000..f9eec9896d4 --- /dev/null +++ b/idea/testData/resolve/partialBodyResolve/PropertyByDelegate.kt @@ -0,0 +1,11 @@ +import kotlin.properties.Delegates + +val prop: Int by Delegates.lazy { + print(1) + val v = f() + g() + v + 1 +} + +fun f(): Int = 1 +fun g(): Int = 2 \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/resolve/PartialBodyResolveTestGenerated.java b/idea/tests/org/jetbrains/jet/resolve/PartialBodyResolveTestGenerated.java index 1afb4ec5a9b..b9b061908d9 100644 --- a/idea/tests/org/jetbrains/jet/resolve/PartialBodyResolveTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/resolve/PartialBodyResolveTestGenerated.java @@ -318,6 +318,12 @@ public class PartialBodyResolveTestGenerated extends AbstractPartialBodyResolveT doTest(fileName); } + @TestMetadata("PropertyByDelegate.kt") + public void testPropertyByDelegate() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/PropertyByDelegate.kt"); + doTest(fileName); + } + @TestMetadata("ReturnLambda.kt") public void testReturnLambda() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/ReturnLambda.kt");