No BodyResolveMode.FULL in slicer
This commit is contained in:
@@ -117,7 +117,7 @@ class InflowSlicer(
|
|||||||
.forEach { it.processPropertyAssignments() }
|
.forEach { it.processPropertyAssignments() }
|
||||||
}
|
}
|
||||||
|
|
||||||
val parameterDescriptor = parameter.resolveToParameterDescriptorIfAny(BodyResolveMode.FULL) ?: return
|
val parameterDescriptor = parameter.resolveToParameterDescriptorIfAny() ?: return
|
||||||
|
|
||||||
if (function is KtFunction) {
|
if (function is KtFunction) {
|
||||||
processCalls(function, includeOverriders, ArgumentSliceProducer(parameterDescriptor))
|
processCalls(function, includeOverriders, ArgumentSliceProducer(parameterDescriptor))
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class OutflowSlicer(
|
|||||||
require(element == declaration.receiverTypeReference)
|
require(element == declaration.receiverTypeReference)
|
||||||
|
|
||||||
if (declaration.isExpectDeclaration()) {
|
if (declaration.isExpectDeclaration()) {
|
||||||
declaration.resolveToDescriptorIfAny(BodyResolveMode.FULL)
|
declaration.resolveToDescriptorIfAny()
|
||||||
?.actualsForExpected()
|
?.actualsForExpected()
|
||||||
?.forEach {
|
?.forEach {
|
||||||
val actualDeclaration = (it as? DeclarationDescriptorWithSource)?.toPsi()
|
val actualDeclaration = (it as? DeclarationDescriptorWithSource)?.toPsi()
|
||||||
@@ -121,7 +121,7 @@ class OutflowSlicer(
|
|||||||
|
|
||||||
if (callable != null) {
|
if (callable != null) {
|
||||||
if (callable.isExpectDeclaration()) {
|
if (callable.isExpectDeclaration()) {
|
||||||
variable.resolveToDescriptorIfAny(BodyResolveMode.FULL)
|
variable.resolveToDescriptorIfAny()
|
||||||
?.actualsForExpected()
|
?.actualsForExpected()
|
||||||
?.forEach {
|
?.forEach {
|
||||||
(it as? DeclarationDescriptorWithSource)?.toPsi()?.passToProcessor()
|
(it as? DeclarationDescriptorWithSource)?.toPsi()?.passToProcessor()
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ import org.jetbrains.kotlin.psi.psiUtil.parents
|
|||||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameOrNull
|
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameOrNull
|
||||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
|
||||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ImplicitReceiver
|
import org.jetbrains.kotlin.resolve.scopes.receivers.ImplicitReceiver
|
||||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
|
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
|
||||||
import org.jetbrains.kotlin.resolve.source.getPsi
|
import org.jetbrains.kotlin.resolve.source.getPsi
|
||||||
@@ -121,7 +120,7 @@ abstract class Slicer(
|
|||||||
.forEach { it.namedUnwrappedElement?.passToProcessor(mode) }
|
.forEach { it.namedUnwrappedElement?.passToProcessor(mode) }
|
||||||
|
|
||||||
if (this is KtCallableDeclaration && isExpectDeclaration()) {
|
if (this is KtCallableDeclaration && isExpectDeclaration()) {
|
||||||
resolveToDescriptorIfAny(BodyResolveMode.FULL)
|
resolveToDescriptorIfAny()
|
||||||
?.actualsForExpected()
|
?.actualsForExpected()
|
||||||
?.forEach {
|
?.forEach {
|
||||||
(it as? DeclarationDescriptorWithSource)?.toPsi()?.passToProcessor(mode)
|
(it as? DeclarationDescriptorWithSource)?.toPsi()?.passToProcessor(mode)
|
||||||
@@ -159,7 +158,7 @@ abstract class Slicer(
|
|||||||
else -> return
|
else -> return
|
||||||
}
|
}
|
||||||
|
|
||||||
val descriptor = callable.resolveToDescriptorIfAny(BodyResolveMode.FULL) as? CallableMemberDescriptor ?: return
|
val descriptor = callable.resolveToDescriptorIfAny() as? CallableMemberDescriptor ?: return
|
||||||
val superDescriptors = if (includeOverriders) {
|
val superDescriptors = if (includeOverriders) {
|
||||||
descriptor.getDeepestSuperDeclarations()
|
descriptor.getDeepestSuperDeclarations()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user