From dde2156f5f37b01a530e4e6bdd8fe5921d41a41d Mon Sep 17 00:00:00 2001 From: Brian Norman Date: Mon, 29 Jan 2024 15:29:54 -0600 Subject: [PATCH] [FIR2IR] Always use property type if var For destructing calls, the component type is used for the property type in all cases. However, this can result in runtime and/or compilation errors when the property is a var and changed, especially when the component is a primitive but the property type is nullable. Instead, only use the component type when the property is also a val. ^KT-64944 Fixed --- ...LFirBlackBoxCodegenBasedTestGenerated.java | 6 ++ ...rsedBlackBoxCodegenBasedTestGenerated.java | 6 ++ .../kotlin/fir/backend/ConversionUtils.kt | 5 +- ...LightTreeBlackBoxCodegenTestGenerated.java | 6 ++ ...hIrFakeOverrideGeneratorTestGenerated.java | 6 ++ .../FirPsiBlackBoxCodegenTestGenerated.java | 6 ++ .../reassignDestructured.fir.ir.txt | 66 +++++++++++++++++++ .../primitiveTypes/reassignDestructured.kt | 32 +++++++++ .../JvmAbiConsistencyTestBoxGenerated.java | 6 ++ .../codegen/BlackBoxCodegenTestGenerated.java | 6 ++ .../IrBlackBoxCodegenTestGenerated.java | 6 ++ ...kBoxCodegenWithIrInlinerTestGenerated.java | 6 ++ .../LightAnalysisModeTestGenerated.java | 5 ++ .../fir/FirJsCodegenBoxTestGenerated.java | 6 ++ .../fir/FirJsES6CodegenBoxTestGenerated.java | 6 ++ .../test/ir/IrJsCodegenBoxTestGenerated.java | 6 ++ .../ir/IrJsES6CodegenBoxTestGenerated.java | 6 ++ .../FirNativeCodegenBoxTestGenerated.java | 6 ++ .../FirNativeCodegenBoxTestNoPLGenerated.java | 6 ++ .../NativeCodegenBoxTestGenerated.java | 6 ++ .../NativeCodegenBoxTestNoPLGenerated.java | 6 ++ .../FirWasmJsCodegenBoxTestGenerated.java | 6 ++ .../test/K1WasmCodegenBoxTestGenerated.java | 6 ++ 23 files changed, 220 insertions(+), 2 deletions(-) create mode 100644 compiler/testData/codegen/box/primitiveTypes/reassignDestructured.fir.ir.txt create mode 100644 compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index 6b9b4ca1589..cc2b98a9e7c 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -38374,6 +38374,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index afca87f4438..c2ea8ffd6c8 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -38374,6 +38374,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt index 445fb2fff9b..33a3c5d7b5b 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt @@ -838,8 +838,9 @@ fun FirExpression.asCompileTimeIrInitializer(components: Fir2IrComponents, expec */ context(Fir2IrComponents) internal fun FirVariable.irTypeForPotentiallyComponentCall(predefinedType: IrType? = null): IrType { - val typeRef = when (val initializer = initializer) { - is FirComponentCall -> initializer.resolvedType + val initializer = initializer + val typeRef = when { + isVal && initializer is FirComponentCall -> initializer.resolvedType else -> { if (predefinedType != null) return predefinedType this.returnTypeRef.coneType diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 1281d6cb60d..eaabf19ed20 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -38007,6 +38007,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index ee0fa75d2a9..4f52ca095b0 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -38007,6 +38007,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 210a3a33c5f..7c533fcf3a7 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -38007,6 +38007,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/testData/codegen/box/primitiveTypes/reassignDestructured.fir.ir.txt b/compiler/testData/codegen/box/primitiveTypes/reassignDestructured.fir.ir.txt new file mode 100644 index 00000000000..6b26b2e3ff6 --- /dev/null +++ b/compiler/testData/codegen/box/primitiveTypes/reassignDestructured.fir.ir.txt @@ -0,0 +1,66 @@ +FILE fqName: fileName:/reassignDestructured.kt + FUN name:getInt visibility:public modality:FINAL <> () returnType:kotlin.Int? + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun getInt (): kotlin.Int? declared in ' + CONST Int type=kotlin.Int value=1 + FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + VAR name:i1 type:kotlin.Int? [val] + CALL 'public final fun getInt (): kotlin.Int? declared in ' type=kotlin.Int? origin=null + VAR name:i2 type:kotlin.Int? [val] + CALL 'public final fun getInt (): kotlin.Int? declared in ' type=kotlin.Int? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Pair [val] + CALL 'public final fun to (that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null + : kotlin.Int? + : kotlin.Int? + $receiver: GET_VAR 'val i1: kotlin.Int? declared in .test1' type=kotlin.Int? origin=null + that: GET_VAR 'val i2: kotlin.Int? declared in .test1' type=kotlin.Int? origin=null + VAR name:int1 type:kotlin.Int? [var] + CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Int? origin=COMPONENT_N(index=1) + $this: GET_VAR 'val tmp_0: kotlin.Pair declared in .test1' type=kotlin.Pair origin=null + VAR name:int2 type:kotlin.Int? [var] + CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.Int? origin=COMPONENT_N(index=2) + $this: GET_VAR 'val tmp_0: kotlin.Pair declared in .test1' type=kotlin.Pair origin=null + SET_VAR 'var int1: kotlin.Int? declared in .test1' type=kotlin.Unit origin=EQ + CONST Null type=kotlin.Nothing? value=null + FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + VAR name:i1 type:kotlin.Int? [val] + CALL 'public final fun getInt (): kotlin.Int? declared in ' type=kotlin.Int? origin=null + VAR name:i2 type:kotlin.Int? [val] + CALL 'public final fun getInt (): kotlin.Int? declared in ' type=kotlin.Int? origin=null + WHEN type=kotlin.Unit origin=IF + BRANCH + if: WHEN type=kotlin.Boolean origin=OROR + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + arg0: GET_VAR 'val i1: kotlin.Int? declared in .test2' type=kotlin.Int? origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Boolean type=kotlin.Boolean value=true + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + arg0: GET_VAR 'val i2: kotlin.Int? declared in .test2' type=kotlin.Int? origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Unit declared in ' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Pair [val] + CALL 'public final fun to (that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null + : kotlin.Int + : kotlin.Int + $receiver: GET_VAR 'val i1: kotlin.Int? declared in .test2' type=kotlin.Int? origin=null + that: GET_VAR 'val i2: kotlin.Int? declared in .test2' type=kotlin.Int? origin=null + VAR name:int1 type:kotlin.Int? [var] + CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Int origin=COMPONENT_N(index=1) + $this: GET_VAR 'val tmp_1: kotlin.Pair declared in .test2' type=kotlin.Pair origin=null + VAR name:int2 type:kotlin.Int? [var] + CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.Int origin=COMPONENT_N(index=2) + $this: GET_VAR 'val tmp_1: kotlin.Pair declared in .test2' type=kotlin.Pair origin=null + SET_VAR 'var int1: kotlin.Int? declared in .test2' type=kotlin.Unit origin=EQ + CONST Null type=kotlin.Nothing? value=null + FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String + BLOCK_BODY + CALL 'public final fun test1 (): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun test2 (): kotlin.Unit declared in ' type=kotlin.Unit origin=null + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt b/compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt new file mode 100644 index 00000000000..d503cedb37d --- /dev/null +++ b/compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt @@ -0,0 +1,32 @@ +// IGNORE_BACKEND_K1: ANY +// WITH_STDLIB +// DUMP_IR +// ISSUE: KT-64944 + +fun getInt(): Int? { + return 1 +} + +fun test1() { + val i1 = getInt() + val i2 = getInt() + + var (int1: Int?, int2: Int?) = i1 to i2 + int1 = null +} + +fun test2() { + val i1 = getInt() + val i2 = getInt() + + if (i1 == null || i2 == null) return + + var (int1: Int?, int2: Int?) = i1 to i2 + int1 = null +} + +fun box(): String { + test1() + test2() + return "OK" +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 77ac21b4904..b35b12a37cd 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -37323,6 +37323,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 338b5f3dfdc..67a7bc271cd 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -35421,6 +35421,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 2fd718742aa..6c86bb69e73 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -37323,6 +37323,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index ab0c98fd92d..97698f1777c 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -37323,6 +37323,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index dbd3d841a3a..b996aa064dd 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -31907,6 +31907,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { runTest("compiler/testData/codegen/box/primitiveTypes/stringEqualsHashCodeToString.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index c4d4ac1f6f7..0115a363f99 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -26853,6 +26853,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index 41b85f90a65..2e0f93ed045 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -26853,6 +26853,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 03342bb7d6f..18fef4fca23 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -26289,6 +26289,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index 62f71a345cf..6c3376b4891 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -26289,6 +26289,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index 037fff20f2e..0fbfc660ec0 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -30647,6 +30647,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index f98f508b102..88157c38f27 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -31345,6 +31345,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 051332347f7..e40f25f630c 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -29373,6 +29373,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 7d9e1de9bd4..9903d07e5cb 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -30060,6 +30060,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java index d05c2d0da30..d4677540769 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java @@ -26817,6 +26817,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 682f09e7284..9bb3493a7d8 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -26253,6 +26253,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } + @Test + @TestMetadata("reassignDestructured.kt") + public void testReassignDestructured() throws Exception { + runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt"); + } + @Test @TestMetadata("stringEqualsHashCodeToString.kt") public void testStringEqualsHashCodeToString() throws Exception {