From 3f99e2391bc4389adaf2ed0b19498c7afa521aa1 Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Thu, 23 Jun 2022 15:25:39 +0200 Subject: [PATCH] Minor: make some util functions public I'm going to use it in Fe10Binding to create descriptors for special constructions --- .../expressions/ControlStructureTypingUtils.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ControlStructureTypingUtils.java b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ControlStructureTypingUtils.java index fbcd862b535..66f772d665f 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ControlStructureTypingUtils.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ControlStructureTypingUtils.java @@ -194,6 +194,19 @@ public class ControlStructureTypingUtils { @NotNull ResolveConstruct construct, @NotNull List argumentNames, @NotNull List isArgumentNullable + ) { + return createFunctionDescriptorForSpecialConstruction(construct, argumentNames, isArgumentNullable, moduleDescriptor, + storageManager); + } + + // used in Fe10Binding in FIR IDE + @SuppressWarnings("WeakerAccess") + public static SimpleFunctionDescriptorImpl createFunctionDescriptorForSpecialConstruction( + @NotNull ResolveConstruct construct, + @NotNull List argumentNames, + @NotNull List isArgumentNullable, + @NotNull ModuleDescriptor moduleDescriptor, + @NotNull StorageManager storageManager ) { assert argumentNames.size() == isArgumentNullable.size(); @@ -310,7 +323,8 @@ public class ControlStructureTypingUtils { return createIndependentDataFlowInfoForArgumentsForCall(dataFlowInfoBeforeTry, dataFlowInfoForArgumentsMap); } - /*package*/ static Call createCallForSpecialConstruction( + // Used in Fe10Binding in FIR IDE + public static Call createCallForSpecialConstruction( @NotNull KtExpression expression, @NotNull KtExpression calleeExpression, @NotNull List arguments