[FIR] Fix CFG/DFA for delegate properties within PCLA
^KT-65262 Fixed
This commit is contained in:
+6
@@ -2808,6 +2808,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
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
@@ -2808,6 +2808,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
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 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");
|
||||
|
||||
+6
@@ -1891,6 +1891,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
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 {
|
||||
|
||||
Generated
+6
@@ -1891,6 +1891,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
|
||||
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
@@ -1891,6 +1891,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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
@@ -1891,6 +1891,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
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
@@ -1950,6 +1950,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
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
@@ -1996,6 +1996,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
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
@@ -1904,6 +1904,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
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
@@ -1951,6 +1951,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
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 {
|
||||
|
||||
Generated
+6
@@ -1879,6 +1879,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo
|
||||
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 {
|
||||
|
||||
Generated
+6
@@ -1879,6 +1879,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user