From 6ee1599efaa94179c0c6457b56d58941874688d9 Mon Sep 17 00:00:00 2001 From: Victor Petukhov Date: Mon, 4 Oct 2021 11:50:26 +0300 Subject: [PATCH] Provide proxy for deprecated `org.jetbrains.kotlin.resolve.calls.callUtil.getValueArgumentForExpression` --- .../jetbrains/kotlin/resolve/calls/callUtil/callUtil.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/callUtil/callUtil.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/callUtil/callUtil.kt index c877a30a764..49820f252d2 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/callUtil/callUtil.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/callUtil/callUtil.kt @@ -15,6 +15,7 @@ import org.jetbrains.kotlin.resolve.calls.util.getCall import org.jetbrains.kotlin.resolve.calls.util.getType import org.jetbrains.kotlin.resolve.calls.util.getCalleeExpressionIfAny import org.jetbrains.kotlin.resolve.calls.util.createLookupLocation +import org.jetbrains.kotlin.resolve.calls.util.getValueArgumentForExpression import org.jetbrains.kotlin.types.KotlinType @Deprecated( @@ -65,3 +66,10 @@ fun Call.createLookupLocation(): KotlinLookupLocation = createLookupLocation() level = DeprecationLevel.ERROR ) fun KtExpression.createLookupLocation(): KotlinLookupLocation? = createLookupLocation() + +@Deprecated( + "Use org.jetbrains.kotlin.resolve.calls.util.getValueArgumentForExpression instead.", + ReplaceWith("getValueArgumentForExpression", "org.jetbrains.kotlin.resolve.calls.util.getValueArgumentForExpression"), + level = DeprecationLevel.ERROR +) +fun Call.getValueArgumentForExpression(expression: KtExpression): ValueArgument? = getValueArgumentForExpression(expression)