Remove 'debugTypeInfo' key

The key became obsolete as the new evaluator doesn't use it anymore.
This commit is contained in:
Yan Zhulanow
2019-02-01 19:33:48 +03:00
parent 6a81c2e1e4
commit 24cdd3f857
3 changed files with 1 additions and 34 deletions
@@ -20,8 +20,6 @@ import com.intellij.openapi.util.Key
import org.jetbrains.kotlin.psi.KtCodeFragment
import org.jetbrains.kotlin.psi.KtElement
import org.jetbrains.kotlin.psi.KtFile
import org.jetbrains.kotlin.psi.KtTypeReference
import org.jetbrains.kotlin.types.KotlinType
val SUPPRESS_DIAGNOSTICS_IN_DEBUG_MODE: Key<Boolean> = Key.create<Boolean>("SUPPRESS_DIAGNOSTICS_IN_DEBUG_MODE")
@@ -43,13 +41,4 @@ var KtFile.suppressDiagnosticsInDebugMode: Boolean
putUserData(SUPPRESS_DIAGNOSTICS_IN_DEBUG_MODE, skip)
}
val DEBUG_TYPE_REFERENCE_STRING: String = "DebugTypeKotlinRulezzzz"
val DEBUG_TYPE_INFO: Key<KotlinType> = Key.create<KotlinType>("DEBUG_TYPE_INFO")
var KtTypeReference.debugTypeInfo: KotlinType?
get() = getUserData(DEBUG_TYPE_INFO)
set(type) {
if (type != null && this.text == DEBUG_TYPE_REFERENCE_STRING) {
putUserData(DEBUG_TYPE_INFO, type)
}
}
val DEBUG_TYPE_REFERENCE_STRING: String = "DebugTypeKotlinRulezzzz"
@@ -31,7 +31,6 @@ import org.jetbrains.kotlin.diagnostics.Errors.*
import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi.codeFragmentUtil.debugTypeInfo
import org.jetbrains.kotlin.psi.codeFragmentUtil.suppressDiagnosticsInDebugMode
import org.jetbrains.kotlin.psi.debugText.getDebugText
import org.jetbrains.kotlin.psi.psiUtil.checkReservedYield
@@ -113,12 +112,6 @@ class TypeResolver(
val resolvedTypeSlice = if (c.abbreviated) BindingContext.ABBREVIATED_TYPE else BindingContext.TYPE
val debugType = typeReference.debugTypeInfo
if (debugType != null) {
c.trace.record(resolvedTypeSlice, typeReference, debugType)
return type(debugType)
}
val annotations = resolveTypeAnnotations(c, typeReference)
val type = resolveTypeElement(c, annotations, typeReference.modifierList, typeReference.typeElement)
c.trace.recordScope(c.scope, typeReference)