[FIR] Fix CFG/DFA for delegate properties within PCLA
^KT-65262 Fixed
This commit is contained in:
+6
@@ -2791,6 +2791,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
|
||||
+6
@@ -2791,6 +2791,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
|
||||
+6
@@ -2791,6 +2791,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
|
||||
+2
-2
@@ -394,9 +394,9 @@ open class FirDeclarationsResolveTransformer(
|
||||
if (isImplicitTypedProperty) {
|
||||
property.resolveSetter(mayResolveSetterBody = true, shouldResolveEverything = shouldResolveEverything)
|
||||
}
|
||||
|
||||
dataFlowAnalyzer.exitDelegateExpression(delegateContainer)
|
||||
}
|
||||
|
||||
dataFlowAnalyzer.exitDelegateExpression(delegateContainer)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-65262
|
||||
|
||||
interface Consumer<in T>
|
||||
|
||||
public fun <T> buildConsumer(
|
||||
block: (Consumer<T>) -> Unit
|
||||
): T = "OK" as T
|
||||
|
||||
fun expectConsumerString(x: Consumer<String>) {}
|
||||
|
||||
fun box() =
|
||||
try {
|
||||
buildConsumer { x ->
|
||||
val y by lazy {
|
||||
expectConsumerString(x)
|
||||
"OK"
|
||||
}
|
||||
|
||||
if (y.length != 2) throw RuntimeException("fail 1")
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
+6
@@ -2791,6 +2791,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
|
||||
+6
@@ -2611,6 +2611,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
|
||||
+6
@@ -2791,6 +2791,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
|
||||
+6
@@ -2791,6 +2791,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
|
||||
+5
@@ -2433,6 +2433,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("pclaRootIsTrySyntheticCallWithDelegate.kt")
|
||||
public void testPclaRootIsTrySyntheticCallWithDelegate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCallWithDelegate.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("posptonedPCLACallInsideStringInterpolation.kt")
|
||||
public void testPosptonedPCLACallInsideStringInterpolation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt");
|
||||
|
||||
Reference in New Issue
Block a user