Provide a proxy for external use of deprecate package org.jetbrains.kotlin.resolve.calls.callUtil
Provided API is `getResolvedCall`, `getType` and `getCall`
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.resolve.calls.callUtil
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.calls.util.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.calls.util.getCall
|
||||
import org.jetbrains.kotlin.resolve.calls.util.getType
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
|
||||
@Deprecated(
|
||||
"Use org.jetbrains.kotlin.resolve.calls.util.getResolvedCall instead.",
|
||||
ReplaceWith("org.jetbrains.kotlin.resolve.calls.util.getResolvedCall"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
fun Call?.getResolvedCall(context: BindingContext): ResolvedCall<out CallableDescriptor>? = getResolvedCall(context)
|
||||
|
||||
@Deprecated(
|
||||
"Use org.jetbrains.kotlin.resolve.calls.util.getResolvedCall instead.",
|
||||
ReplaceWith("org.jetbrains.kotlin.resolve.calls.util.getResolvedCall"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
fun KtElement?.getResolvedCall(context: BindingContext): ResolvedCall<out CallableDescriptor>? = getResolvedCall(context)
|
||||
|
||||
@Deprecated(
|
||||
"Use org.jetbrains.kotlin.resolve.calls.util.getType instead.",
|
||||
ReplaceWith("org.jetbrains.kotlin.resolve.calls.util.getType"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
fun KtExpression.getType(context: BindingContext): KotlinType? = getType(context)
|
||||
|
||||
@Deprecated(
|
||||
"Use org.jetbrains.kotlin.resolve.calls.util.getCall instead.",
|
||||
ReplaceWith("org.jetbrains.kotlin.resolve.calls.util.getCall"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
fun KtElement.getCall(context: BindingContext): Call? = getCall(context)
|
||||
Reference in New Issue
Block a user