diff options
author | Victor Petukhov <victor.petukhov@jetbrains.com> | 2022-02-17 12:22:21 +0100 |
---|---|---|
committer | Space <> | 2022-05-26 09:52:40 +0000 |
commit | 1a8e994c9da60250216bcdfec3e4675210b57f96 (patch) | |
tree | 0b6a282697c059717d86327a303f3fc9ac940fd6 | |
parent | fc924ba3bcdb973d404378c7dc367893291955fb (diff) | |
download | kotlin-1a8e994c9da60250216bcdfec3e4675210b57f96.tar.gz |
[FE 1.0] Take care standalone lambdas during updating types in the builder inference
^KT-50520 Fixed
14 files changed, 115 insertions, 60 deletions
diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 9fa7d043633..830bd5b5c9e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -19487,6 +19487,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } @Test + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + + @Test @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/LocalVariableResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/LocalVariableResolver.kt index b65895165dd..9f888a918f1 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/LocalVariableResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/LocalVariableResolver.kt @@ -190,9 +190,6 @@ class LocalVariableResolver( initializeWithDefaultGetterSetter(propertyDescriptor) trace.record(BindingContext.VARIABLE, variable, propertyDescriptor) result = propertyDescriptor - if (inferenceSession is BuilderInferenceSession) { - inferenceSession.addLocalVariable(variable) - } } else { val variableDescriptor = resolveLocalVariableDescriptorWithType(scope, variable, null, trace) // For a local variable the type must not be deferred @@ -200,11 +197,11 @@ class LocalVariableResolver( variableDescriptor, scope, variable, dataFlowInfo, inferenceSession, trace, local = true ) variableDescriptor.setOutType(type) - if (inferenceSession is BuilderInferenceSession) { - inferenceSession.addLocalVariable(variable) - } result = variableDescriptor } + if (inferenceSession is BuilderInferenceSession) { + inferenceSession.addExpression(variable) + } variableTypeAndInitializerResolver .setConstantForVariableIfNeeded(result, scope, variable, dataFlowInfo, type, inferenceSession, trace) // Type annotations also should be resolved diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt index ffe5e21ba9c..d63d3c5ed29 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt @@ -8,15 +8,15 @@ package org.jetbrains.kotlin.resolve.calls.inference import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import org.jetbrains.kotlin.descriptors.impl.* +import org.jetbrains.kotlin.descriptors.impl.AnonymousFunctionDescriptor +import org.jetbrains.kotlin.descriptors.impl.LocalVariableDescriptor +import org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.anyDescendantOfType import org.jetbrains.kotlin.psi.psiUtil.getParentOfType import org.jetbrains.kotlin.psi.psiUtil.isAncestor import org.jetbrains.kotlin.resolve.* import org.jetbrains.kotlin.resolve.calls.ArgumentTypeResolver -import org.jetbrains.kotlin.resolve.calls.util.shouldBeSubstituteWithStubTypes -import org.jetbrains.kotlin.resolve.calls.util.toOldSubstitution import org.jetbrains.kotlin.resolve.calls.components.* import org.jetbrains.kotlin.resolve.calls.components.candidate.ResolutionCandidate import org.jetbrains.kotlin.resolve.calls.context.BasicCallResolutionContext @@ -25,6 +25,8 @@ import org.jetbrains.kotlin.resolve.calls.inference.model.* import org.jetbrains.kotlin.resolve.calls.model.* import org.jetbrains.kotlin.resolve.calls.tower.* import org.jetbrains.kotlin.resolve.calls.util.FakeCallableDescriptorForObject +import org.jetbrains.kotlin.resolve.calls.util.shouldBeSubstituteWithStubTypes +import org.jetbrains.kotlin.resolve.calls.util.toOldSubstitution import org.jetbrains.kotlin.resolve.deprecation.DeprecationResolver import org.jetbrains.kotlin.resolve.descriptorUtil.hasBuilderInferenceAnnotation import org.jetbrains.kotlin.resolve.descriptorUtil.shouldBeSubstituteWithStubTypes @@ -71,11 +73,7 @@ class BuilderInferenceSession( } private val commonCalls = arrayListOf<PSICompletedCallInfo>() - - private val localVariables = arrayListOf<KtVariableDeclaration>() - - // These calls come from the old type inference - private val oldDoubleColonExpressionCalls = arrayListOf<KtExpression>() + private val commonExpressions = arrayListOf<KtExpression>() private var hasInapplicableCall = false @@ -128,10 +126,6 @@ class BuilderInferenceSession( } } - fun addOldCallableReferenceCalls(callExpression: KtExpression) { - oldDoubleColonExpressionCalls.add(callExpression) - } - override fun addCompletedCallInfo(callInfo: CompletedCallInfo) { require(callInfo is PSICompletedCallInfo) { "Wrong instance of callInfo: $callInfo" } @@ -156,8 +150,8 @@ class BuilderInferenceSession( } } - fun addLocalVariable(variable: KtVariableDeclaration) { - localVariables.add(variable) + fun addExpression(expression: KtExpression) { + commonExpressions.add(expression) } private fun anyReceiverContainStubType(descriptor: CallableDescriptor): Boolean { @@ -178,7 +172,6 @@ class BuilderInferenceSession( return null } - @OptIn(ExperimentalStdlibApi::class) private fun findAllParentBuildInferenceSessions() = buildList { var currentSession: BuilderInferenceSession? = findParentBuildInferenceSession() @@ -257,7 +250,7 @@ class BuilderInferenceSession( kotlinConstraintSystemCompleter.completeConstraintSystem( commonSystem.asConstraintSystemCompleterContext(), builtIns.unitType, - partiallyResolvedCallsInfo.map { it.callResolutionResult.resultCallAtom }, + commonPartiallyResolvedCalls.map { it.callResolutionResult.resultCallAtom }, completionMode, diagnosticsHolder ) @@ -275,7 +268,6 @@ class BuilderInferenceSession( return commonSystem.fixedTypeVariables.cast() // TODO: SUB } - @OptIn(ExperimentalStdlibApi::class) private fun getNestedBuilderInferenceSessions() = buildList { for (nestedSession in nestedInferenceSessions) { when (nestedSession) { @@ -446,13 +438,9 @@ class BuilderInferenceSession( integrateConstraints(initialStorage, nonFixedToVariablesSubstitutor, false) - for (call in commonCalls) { + for (call in commonCalls + commonPartiallyResolvedCalls) { val storage = call.callResolutionResult.constraintSystem.getBuilder().currentStorage() - integrateConstraints(storage, nonFixedToVariablesSubstitutor, false) - } - for (call in partiallyResolvedCallsInfo) { - val storage = call.callResolutionResult.constraintSystem.getBuilder().currentStorage() - integrateConstraints(storage, nonFixedToVariablesSubstitutor, true) + integrateConstraints(storage, nonFixedToVariablesSubstitutor, shouldIntegrateAllConstraints = call is PSIPartialCallInfo) } return commonSystem.notFixedTypeVariables.all { it.value.constraints.isEmpty() } @@ -468,10 +456,31 @@ class BuilderInferenceSession( ) } - private fun updateLocalVariable(localVariable: KtVariableDeclaration, substitutor: NewTypeSubstitutor) { - val descriptor = trace[BindingContext.VARIABLE, localVariable] as? LocalVariableDescriptor - if (descriptor != null && descriptor.type.shouldBeUpdated()) { - descriptor.setOutType(substitutor.safeSubstitute(descriptor.type.unwrap())) + private fun updateExpressionDescriptorAndType(expression: KtExpression, substitutor: NewTypeSubstitutor) { + val currentExpressionType = trace.getType(expression) + if (currentExpressionType != null) { + trace.recordType(expression, substitutor.safeSubstitute(currentExpressionType.unwrap())) + } + + val (currentDescriptorType, updateDescriptorType) = when (expression) { + is KtLambdaExpression -> { + val descriptor = trace[BindingContext.FUNCTION, expression.functionLiteral] as? AnonymousFunctionDescriptor ?: return + val currentType = descriptor.returnType ?: return + currentType to descriptor::setReturnType + } + is KtVariableDeclaration -> { + val descriptor = trace[BindingContext.VARIABLE, expression] as? LocalVariableDescriptor ?: return + descriptor.type to descriptor::setOutType + } + is KtDoubleColonExpression -> { + completeDoubleColonExpression(expression, substitutor) + return + } + else -> return + } + + if (currentDescriptorType.shouldBeUpdated()) { + updateDescriptorType(substitutor.safeSubstitute(currentDescriptorType.unwrap())) } } @@ -511,12 +520,6 @@ class BuilderInferenceSession( atomCompleter.substituteFunctionLiteralDescriptor(resolvedAtom = null, descriptor = declarationDescriptor, substitutor) } - val recordedType = trace.getType(expression) - - if (recordedType != null) { - trace.recordType(expression, substitutor.safeSubstitute(recordedType.unwrap())) - } - val targetExpression = when (expression) { is KtCallableReferenceExpression -> expression.callableReference is KtClassLiteralExpression -> expression.receiverExpression @@ -608,25 +611,18 @@ class BuilderInferenceSession( topLevelCallContext.replaceBindingTrace(findTopLevelTrace()).replaceInferenceSession(this) ) - for (localVariable in localVariables) { - updateLocalVariable(localVariable, nonFixedTypesToResultSubstitutor) - } - - for (completedCall in commonCalls) { - updateCall(completedCall, nonFixedTypesToResultSubstitutor, nonFixedTypesToResult) - reportErrors(completedCall, completedCall.resolvedCall, errors) + for (expression in commonExpressions) { + updateExpressionDescriptorAndType(expression, nonFixedTypesToResultSubstitutor) } - for (callInfo in partiallyResolvedCallsInfo) { - val resolvedCall = completeCall(callInfo, atomCompleter) ?: continue - reportErrors(callInfo, resolvedCall, errors) + for (call in commonCalls) { + updateCall(call, nonFixedTypesToResultSubstitutor, nonFixedTypesToResult) + reportErrors(call, call.resolvedCall, errors) } - for (call in oldDoubleColonExpressionCalls) { - when (call) { - is KtDoubleColonExpression -> completeDoubleColonExpression(call, nonFixedTypesToResultSubstitutor) - else -> throw Exception("Unsupported call expression type") - } + for (call in commonPartiallyResolvedCalls) { + val resolvedCall = completeCall(call, atomCompleter) ?: continue + reportErrors(call, resolvedCall, errors) } atomCompleter.completeAll(lambda) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/StubTypesBasedInferenceSession.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/StubTypesBasedInferenceSession.kt index 1f62d96428a..7f5a61cff0c 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/StubTypesBasedInferenceSession.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/StubTypesBasedInferenceSession.kt @@ -28,7 +28,7 @@ abstract class StubTypesBasedInferenceSession<D : CallableDescriptor>( protected val callComponents: KotlinCallComponents, val builtIns: KotlinBuiltIns ) : InferenceSession { - protected val partiallyResolvedCallsInfo = arrayListOf<PSIPartialCallInfo>() + protected val commonPartiallyResolvedCalls = arrayListOf<PSIPartialCallInfo>() val errorCallsInfo = arrayListOf<PSIErrorCallInfo<D>>() private val completedCalls = hashSetOf<ResolvedAtom>() protected val nestedInferenceSessions = hashSetOf<StubTypesBasedInferenceSession<*>>() @@ -49,7 +49,7 @@ abstract class StubTypesBasedInferenceSession<D : CallableDescriptor>( if (callInfo !is PSIPartialCallInfo) { throw AssertionError("Call info for $callInfo should be instance of PSIPartialCallInfo") } - partiallyResolvedCallsInfo.add(callInfo) + commonPartiallyResolvedCalls.add(callInfo) } override fun addCompletedCallInfo(callInfo: CompletedCallInfo) { @@ -65,7 +65,7 @@ abstract class StubTypesBasedInferenceSession<D : CallableDescriptor>( } override fun currentConstraintSystem(): ConstraintStorage { - return partiallyResolvedCallsInfo.lastOrNull()?.callResolutionResult?.constraintSystem?.getBuilder()?.currentStorage() + return commonPartiallyResolvedCalls.lastOrNull()?.callResolutionResult?.constraintSystem?.getBuilder()?.currentStorage() ?: ConstraintStorage.Empty } @@ -75,7 +75,7 @@ abstract class StubTypesBasedInferenceSession<D : CallableDescriptor>( override fun shouldCompleteResolvedSubAtomsOf(resolvedCallAtom: ResolvedCallAtom) = true fun resolveCandidates(resolutionCallbacks: KotlinResolutionCallbacks): List<ResolutionResultCallInfo<D>> { - val resolvedCallsInfo = partiallyResolvedCallsInfo.toList() + val resolvedCallsInfo = commonPartiallyResolvedCalls.toList() val diagnosticHolder = KotlinDiagnosticsHolder.SimpleHolder() diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt index e06cf486a71..49d408e32c6 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt @@ -111,7 +111,7 @@ class DoubleColonExpressionResolver( val result = resolveDoubleColonLHS(expression, c) if (c.inferenceSession is BuilderInferenceSession && result?.type?.contains { it is StubTypeForBuilderInference } == true) { - c.inferenceSession.addOldCallableReferenceCalls(expression) + c.inferenceSession.addExpression(expression) } if (result != null && !result.type.isError) { @@ -557,7 +557,7 @@ class DoubleColonExpressionResolver( val dataFlowInfo = (lhs as? DoubleColonLHS.Expression)?.dataFlowInfo ?: c.dataFlowInfo if (c.inferenceSession is BuilderInferenceSession && result?.contains { it is StubTypeForBuilderInference } == true) { - c.inferenceSession.addOldCallableReferenceCalls(expression) + c.inferenceSession.addExpression(expression) } return dataFlowAnalyzer.checkType(createTypeInfo(result, dataFlowInfo), expression, c) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt index 4e5a041bf04..3a123dcac69 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt @@ -24,6 +24,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getAnnotationEntries import org.jetbrains.kotlin.resolve.* import org.jetbrains.kotlin.resolve.BindingContext.EXPECTED_RETURN_TYPE import org.jetbrains.kotlin.resolve.calls.context.ContextDependency +import org.jetbrains.kotlin.resolve.calls.inference.BuilderInferenceSession import org.jetbrains.kotlin.resolve.calls.inference.model.TypeVariableTypeConstructor import org.jetbrains.kotlin.resolve.checkers.TrailingCommaChecker import org.jetbrains.kotlin.resolve.checkers.UnderscoreChecker @@ -182,6 +183,10 @@ internal class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Expre functionDescriptor.createFunctionType(components.builtIns, suspendFunctionTypeExpected)!! ) + if (context.inferenceSession is BuilderInferenceSession) { + context.inferenceSession.addExpression(expression) + } + if (functionTypeExpected) { // all checks were done before return createTypeInfo(resultType, context) diff --git a/compiler/testData/codegen/box/inference/builderInference/kt50520.kt b/compiler/testData/codegen/box/inference/builderInference/kt50520.kt new file mode 100644 index 00000000000..9d0288e8488 --- /dev/null +++ b/compiler/testData/codegen/box/inference/builderInference/kt50520.kt @@ -0,0 +1,11 @@ +// WITH_STDLIB +// IGNORE_BACKEND_FIR: JVM_IR +// FIR status: different behavour with FE 1.0, reported `NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER` + +fun box(): String { + buildList { + val foo = { first() } + add(0, foo) + } + return "OK" +}
\ No newline at end of file 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 ee851fa474b..7497764b71d 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 @@ -19055,6 +19055,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } @Test + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + + @Test @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); 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 ff4663b5386..b817f4119ce 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 @@ -19487,6 +19487,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } @Test + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + + @Test @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 2539218f3e3..2703a658533 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -15848,6 +15848,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inference/builderInference/kt49887.kt"); } + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index bffba527566..5206c552095 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -14833,6 +14833,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } @Test + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + + @Test @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); 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 0e6931a770b..b17f4de25cd 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 @@ -14797,6 +14797,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } @Test + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + + @Test @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index 0e8c84a0c61..5917b91d984 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -12480,6 +12480,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inference/builderInference/kt49887.kt"); } + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); 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 bce406d6967..df8e562f1ed 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 @@ -15907,6 +15907,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest } @Test + @TestMetadata("kt50520.kt") + public void testKt50520() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt"); + } + + @Test @TestMetadata("kt51988.kt") public void testKt51988() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt51988.kt"); |