Undeprecate VariableDescriptorWithAccessors.isDelegated

Apparently there's quite a few valid usages of this method outside of
the compiler frontend, where manual suppression is annoying.
This commit is contained in:
Alexander Udalov
2020-07-06 21:17:55 +02:00
parent 50b2ea7053
commit 8c71d8f126
22 changed files with 36 additions and 45 deletions
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.descriptors.impl.LocalVariableDescriptor
import org.jetbrains.kotlin.descriptors.impl.SyntheticFieldDescriptor
import org.jetbrains.kotlin.idea.debugger.evaluate.*
import org.jetbrains.kotlin.idea.debugger.evaluate.DebuggerFieldPropertyDescriptor
import org.jetbrains.kotlin.idea.debugger.evaluate.KotlinCodeFragmentFactory.Companion.FAKE_JAVA_CONTEXT_FUNCTION_NAME
import org.jetbrains.kotlin.idea.debugger.evaluate.compilation.CodeFragmentParameter.*
import org.jetbrains.kotlin.idea.debugger.safeLocation
@@ -313,11 +312,8 @@ class CodeFragmentParameterAnalyzer(
val isLValue = unwrappedExpression?.let { isAssignmentLValue(it) } ?: false
parameters.getOrPut(target) {
val type = target.type
@Suppress("DEPRECATION")
val kind = if (target is LocalVariableDescriptor && target.isDelegated) Kind.DELEGATED else Kind.ORDINARY
Smart(Dumb(kind, target.name.asString()), type, target, isLValue)
Smart(Dumb(kind, target.name.asString()), target.type, target, isLValue)
}
}
else -> null