diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/setWithTrailingLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/setWithTrailingLambda.fir.txt index 59b2b72ff83..fb008473e7f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/setWithTrailingLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/setWithTrailingLambda.fir.txt @@ -8,6 +8,7 @@ FILE: setWithTrailingLambda.kt ^ Unit } ) + Unit } public final data class EditorData : R|kotlin/Any| { public constructor(meta: R|MyMap|): R|EditorData| { diff --git a/compiler/fir/analysis-tests/testData/resolve/arrays/arraySet.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arrays/arraySet.fir.txt index c97776166dc..82e0b661637 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arrays/arraySet.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arrays/arraySet.fir.txt @@ -46,10 +46,13 @@ FILE: arraySet.kt } public final fun test_1(a: R|A|): R|kotlin/Unit| { R|/a|.R|SubstitutionOverride|(Int(0), R|/B.B|()) + Unit } public final fun test_2(a: R|A|): R|kotlin/Unit| { R|/a|.R|SubstitutionOverride|(Int(0), R|/C.C|()) + Unit } public final fun test_3(a: R|A|): R|kotlin/Unit| { R|/a|.R|SubstitutionOverride|(Int(0), R|/D.D|()) + Unit } diff --git a/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_3.fir.txt b/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_3.fir.txt index ccd167341ae..01845480a98 100644 --- a/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_3.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_3.fir.txt @@ -26,6 +26,7 @@ FILE: notUselessCast_3.kt } ) R|/cards|.R|SubstitutionOverride>|>|(Int(0)).R|SubstitutionOverride|>|(Int(0)).R|SubstitutionOverride|(Int(0), Q|MARKED|) + Unit } public final fun test_2(): R|kotlin/Unit| { lval lines: R|kotlin/collections/List| = R|kotlin/collections/listOf|() @@ -40,4 +41,5 @@ FILE: notUselessCast_3.kt } ) R|/cards|.R|SubstitutionOverride>|>|(Int(0)).R|SubstitutionOverride|>|(Int(0)).R|SubstitutionOverride#|(Int(0), Q|MARKED|) + Unit } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt index 73a9970cfda..de414a6595d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt @@ -12,6 +12,7 @@ FILE: typeAliasWithForEach.kt lval result: R|java/util/HashMap| = R|java/util/HashMap.HashMap|() this@R|/deepCopy|.R|SubstitutionOverride|( = forEach@fun (key: R|@EnhancedNullability kotlin/String|, value: R|@EnhancedNullability ArgsInfo|): R|kotlin/Unit| { R|/result|.R|kotlin/collections/set|(R|/key|, R|/ArgsInfoImpl.ArgsInfoImpl|(R|/value|)) + Unit } ) ^deepCopy R|/result| diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirFunctionReturnTypeMismatchChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirFunctionReturnTypeMismatchChecker.kt index d116a83542d..c77f14f26fa 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirFunctionReturnTypeMismatchChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirFunctionReturnTypeMismatchChecker.kt @@ -88,7 +88,7 @@ object FirFunctionReturnTypeMismatchChecker : FirReturnExpressionChecker() { ) } } - } else if (resultExpression.source?.kind == KtFakeSourceElementKind.ImplicitUnit && !functionReturnType.isUnit) { + } else if (resultExpression.source?.kind is KtFakeSourceElementKind.ImplicitUnit && !functionReturnType.isUnit) { reporter.reportOn( resultExpression.source, RETURN_TYPE_MISMATCH, diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index f4624b9a835..e36a2bfd52e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -56,6 +56,7 @@ import org.jetbrains.kotlin.psi.KtBinaryExpression import org.jetbrains.kotlin.psi.KtForExpression import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.util.OperatorNameConventions +import org.jetbrains.kotlin.utils.addToStdlib.runUnless class Fir2IrVisitor( private val components: Fir2IrComponents, @@ -758,7 +759,9 @@ class Fir2IrVisitor( private fun FirStatement.toIrStatement(): IrStatement? { if (this is FirTypeAlias) return null - if (this is FirUnitExpression) return convertToIrExpression(this) + if (this is FirUnitExpression) return runUnless(source?.kind is KtFakeSourceElementKind.ImplicitUnit.IndexedAssignmentCoercion) { + convertToIrExpression(this) + } if (this is FirContractCallBlock) return null if (this is FirBlock) return convertToIrExpression(this) return accept(this@Fir2IrVisitor, null) as IrStatement 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 e527b9ebb8d..feeac1af083 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 @@ -18587,6 +18587,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() 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 decce16a244..a88428b6537 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 @@ -18587,6 +18587,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception { diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt index 0479d6807fb..2bf457c1fff 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt @@ -203,7 +203,7 @@ class LightTreeRawFirExpressionBuilder( source = expressionSource.fakeElement(KtFakeSourceElementKind.ImplicitReturn.FromExpressionBody) this.target = target result = buildUnitExpression { - source = expressionSource.fakeElement(KtFakeSourceElementKind.ImplicitUnit) + source = expressionSource.fakeElement(KtFakeSourceElementKind.ImplicitUnit.LambdaCoercion) } } ) @@ -1391,7 +1391,7 @@ class LightTreeRawFirExpressionBuilder( } val calculatedFirExpression = firExpression ?: buildUnitExpression { - source = returnExpression.toFirSourceElement(KtFakeSourceElementKind.ImplicitUnit) + source = returnExpression.toFirSourceElement(KtFakeSourceElementKind.ImplicitUnit.Return) } return calculatedFirExpression.toReturn( baseSource = returnExpression.toFirSourceElement(), diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt index 06a3526a091..da822651793 100644 --- a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt @@ -1752,7 +1752,7 @@ open class PsiRawFirBuilder( source = expressionSource.fakeElement(KtFakeSourceElementKind.ImplicitReturn.FromExpressionBody) this.target = target result = buildUnitExpression { - source = expressionSource.fakeElement(KtFakeSourceElementKind.ImplicitUnit) + source = expressionSource.fakeElement(KtFakeSourceElementKind.ImplicitUnit.LambdaCoercion) } } ) @@ -2269,7 +2269,7 @@ open class PsiRawFirBuilder( } override fun visitReturnExpression(expression: KtReturnExpression, data: FirElement?): FirElement { - val source = expression.toFirSourceElement(KtFakeSourceElementKind.ImplicitUnit) + val source = expression.toFirSourceElement(KtFakeSourceElementKind.ImplicitUnit.Return) val result = expression.returnedExpression?.toFirExpression("Incorrect return expression") ?: buildUnitExpression { this.source = source } return result.toReturn(source, expression.getTargetLabel()?.getReferencedName(), fromKtReturnExpression = true) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt index 3957425d5e6..df83ca6edb2 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt @@ -2,10 +2,12 @@ FILE: arrayAssignment.kt public? final? fun test(): R|kotlin/Unit| { lval x: = intArrayOf#(IntegerLiteral(1), IntegerLiteral(2), IntegerLiteral(3)) x#.set#(IntegerLiteral(1), IntegerLiteral(0)) + Unit } public? final? fun foo(): { ^foo IntegerLiteral(1) } public? final? fun test2(): R|kotlin/Unit| { intArrayOf#(IntegerLiteral(1), IntegerLiteral(2), IntegerLiteral(3)).set#(foo#(), IntegerLiteral(1)) + Unit } diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/safeCallsWithAssignment.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/safeCallsWithAssignment.txt index 97ff3dbde80..01de1224e5d 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/safeCallsWithAssignment.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/safeCallsWithAssignment.txt @@ -4,10 +4,16 @@ FILE: safeCallsWithAssignment.kt a#?.{ $subj$.b# }?.{ $subj$.c# = IntegerLiteral(1) } a#?.{ $subj$.b# }.c# = IntegerLiteral(1) a#?.{ $subj$.b#.set#(IntegerLiteral(0), IntegerLiteral(1)) } + Unit a#?.{ $subj$.b# }?.{ $subj$.c#.set#(IntegerLiteral(0), IntegerLiteral(1)) } + Unit a#?.{ $subj$.b# }.c#.set#(IntegerLiteral(0), IntegerLiteral(1)) + Unit a#?.{ $subj$.b#.get#(IntegerLiteral(0)).set#(IntegerLiteral(0), IntegerLiteral(1)) } + Unit a#?.{ $subj$.b# }?.{ $subj$.c#.get#(IntegerLiteral(0)).set#(IntegerLiteral(0), IntegerLiteral(1)) } + Unit a#?.{ $subj$.b# }.c#.get#(IntegerLiteral(0)).set#(IntegerLiteral(0), IntegerLiteral(1)) + Unit a#?.{ $subj$.b# }.d#() = IntegerLiteral(1) } diff --git a/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt b/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt index dadb5de567d..4a20cdbbd66 100644 --- a/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt +++ b/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt @@ -749,7 +749,13 @@ abstract class AbstractRawFirBuilder(val baseSession: FirSession, val context return if (operation == FirOperation.ASSIGN) { val result = unwrappedLhs.convert() result.replaceAnnotations(result.annotations.smartPlus(annotations)) - result.pullUpSafeCallIfNecessary() + buildBlock { + source = result.source + statements += result.pullUpSafeCallIfNecessary() + statements += buildUnitExpression { + source = result.source?.fakeElement(KtFakeSourceElementKind.ImplicitUnit.IndexedAssignmentCoercion) + } + } } else { val receiver = unwrappedLhs.convert() diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt index c87c7bcdd6d..bed25c4d591 100644 --- a/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt +++ b/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt @@ -86,9 +86,19 @@ sealed class KtFakeSourceElementKind(final override val shouldSkipErrorTypeRepor object FromLastStatement : ImplicitReturn() } - // return expression in procedures -> return Unit - // with a fake sources which refers to the return statement - object ImplicitUnit : KtFakeSourceElementKind() + sealed class ImplicitUnit : KtFakeSourceElementKind() { + // this source is used for implicit returns from empty lambdas {} + // fake source refers to the lambda expression + object LambdaCoercion : ImplicitUnit() + + // this source is used for 'return' without given value converted to 'return Unit' + // fake source refers to the return statement + object Return : ImplicitUnit() + + // this source is used for 'a[i] = b' converted to { a[i] = b; Unit } + // fake source refers to the assignment statement + object IndexedAssignmentCoercion : ImplicitUnit() + } // delegates are wrapped into FirWrappedDelegateExpression // with a fake sources which refers to delegated expression diff --git a/compiler/testData/codegen/box/fir/listAssignmentInWhen.kt b/compiler/testData/codegen/box/fir/listAssignmentInWhen.kt new file mode 100644 index 00000000000..9605876063c --- /dev/null +++ b/compiler/testData/codegen/box/fir/listAssignmentInWhen.kt @@ -0,0 +1,14 @@ +// ISSUE: KT-59748 +// WITH_STDLIB + +fun foo(list: MutableList, condition: Boolean): Unit = when { + condition -> list[0] = "OK" + else -> Unit +} + +fun box(): String { + val list = mutableListOf("FAIL") + foo(list, true) + foo(list, false) + return list[0] as String +} diff --git a/compiler/testData/diagnostics/tests/regressions/kt235.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt235.fir.kt index 1b36e923024..b27af0f7e96 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt235.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt235.fir.kt @@ -5,7 +5,7 @@ package kt235 fun main() { val array = MyArray() val f: () -> String = { - array[2] = 23 //error: Type mismatch: inferred type is Int (!!!) but String was expected + array[2] = 23 //error: Type mismatch: inferred type is Int (!!!) but String was expected } val g: () -> String = { var x = 1 @@ -17,11 +17,11 @@ fun main() { } val array1 = MyArray1() val i: () -> String = { - array1[2] = 23 + array1[2] = 23 } val fi: () -> String = { - array[2] = 23 + array[2] = 23 } val gi: () -> String = { var x = 1 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/setOperatorOnDynamic.fir.txt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/setOperatorOnDynamic.fir.txt index 0780b438129..45d8886b4fa 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/setOperatorOnDynamic.fir.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/setOperatorOnDynamic.fir.txt @@ -7,6 +7,7 @@ FILE: setOperatorOnDynamic.fir.kt ) lval x3: R|kotlin/Any| = R|kotlin/arrayOf|().R|kotlin/collections/fold|(R|kotlin/js/js|(String(({}))), = fold@fun (res: R|dynamic|, key: R|kotlin/String|): R|dynamic| { R|/res|.R|/set|(vararg(R|/key|, String(hello))) + Unit ^ R|/res| } ) diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/unsafeAssignmentExtra.fir.txt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/unsafeAssignmentExtra.fir.txt index 080dc258912..09adea5d716 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/unsafeAssignmentExtra.fir.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/unsafeAssignmentExtra.fir.txt @@ -29,6 +29,7 @@ FILE: unsafeAssignmentExtra.fir.kt public final fun main(arg: R|kotlin/Any|, condition: R|kotlin/Boolean|): R|kotlin/Unit| { lval value: R|Foo| = R|/myBuilder|( = myBuilder@fun R|Foo|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|>|.R|SubstitutionOverride|(Int(0), Int(123)) + Unit this@R|special/anonymous|.R|SubstitutionOverride| = Int(45) { lval : R|kotlin/Int| = this@R|special/anonymous|.R|SubstitutionOverride| @@ -103,6 +104,7 @@ FILE: unsafeAssignmentExtra.fir.kt this@R|special/anonymous|.R|SubstitutionOverride|(String()) this@R|special/anonymous|.R|SubstitutionOverride| = Int(45) this@R|special/anonymous|.R|SubstitutionOverride|>|.R|SubstitutionOverride|(Int(0), Int(123)) + Unit R|/baz|(this@R|special/anonymous|.R|SubstitutionOverride|) } ) diff --git a/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.kt index 7f3ef54b052..464e0350454 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.kt @@ -1,10 +1,10 @@ // ISSUE: KT-59748 // FIR_DUMP -fun foo(list: MutableList, condition: Boolean): Unit = when { +fun foo(list: MutableList, condition: Boolean): Unit = when { condition -> list[0] = "" else -> Unit -} +} fun bar(list: MutableList, condition: Boolean): Unit = when { condition -> list.set(0, "") diff --git a/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.txt b/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.txt index 4d682c1ed88..fce42a5e208 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/listAssignmentInWhen.fir.txt @@ -2,7 +2,11 @@ FILE: listAssignmentInWhen.fir.kt public final fun foo(list: R|kotlin/collections/MutableList|, condition: R|kotlin/Boolean|): R|kotlin/Unit| { ^foo when () { R|/condition| -> { - R|/list|.R|SubstitutionOverride|(Int(0), String()) + { + R|/list|.R|SubstitutionOverride|(Int(0), String()) + Unit + } + } else -> { Q|kotlin/Unit| 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 722aed0a7f7..f6634f416de 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 @@ -17711,6 +17711,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() 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 77cf894b725..15787873ecf 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 @@ -18587,6 +18587,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() 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 f9aba070ea5..a3e88d8c6ec 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 @@ -18587,6 +18587,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() 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 002eeebedc2..a8993e246d6 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -15440,6 +15440,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception { runTest("compiler/testData/codegen/box/fir/localInvokeExtension.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 215bff5fa34..888c16b58f2 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 @@ -13679,6 +13679,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() 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 8a4290099dc..5ff2b8e437f 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 @@ -13679,6 +13679,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() 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 d6d2e59b765..35d00bdec41 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 @@ -13679,6 +13679,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index ab172c9cde9..c8fb3b22f0c 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -14785,6 +14785,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 49847022784..08828f930ef 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -15133,6 +15133,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 1d43c21ffd9..fb248c740cc 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -14612,6 +14612,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 22d43f224a5..9c1e9d6973a 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -14786,6 +14786,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index 45d7580d319..864933919b1 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -13655,6 +13655,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() 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 9d8c0041dec..b00751657f1 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 @@ -13655,6 +13655,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("listAssignmentInWhen.kt") + public void testListAssignmentInWhen() throws Exception { + runTest("compiler/testData/codegen/box/fir/listAssignmentInWhen.kt"); + } + @Test @TestMetadata("localInvokeExtension.kt") public void testLocalInvokeExtension() throws Exception {