[analysis] remove redundant diagnostic suppression
This commit is contained in:
+1
-1
@@ -455,7 +455,7 @@ internal class KtFe10CallResolver(
|
||||
)
|
||||
}
|
||||
}
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
return KtSimpleFunctionCall(
|
||||
partiallyAppliedSymbol,
|
||||
argumentMapping,
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ internal class ValidityAwareCachedValue<T>(
|
||||
) : ReadOnlyProperty<Any, T> {
|
||||
private val lazyValue = lazy(LazyThreadSafetyMode.PUBLICATION, init)
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun getValue(thisRef: Any, property: KProperty<*>): T {
|
||||
token.assertIsValidAndAccessible()
|
||||
return lazyValue.value
|
||||
|
||||
+1
-4
@@ -42,10 +42,7 @@ class KtFirAnalysisSessionProvider(project: Project) : CachingKtAnalysisSessionP
|
||||
override fun createAnalysisSession(
|
||||
firResolveSession: LLFirResolveSession,
|
||||
token: KtLifetimeToken,
|
||||
): KtAnalysisSession {
|
||||
@Suppress("DEPRECATION")
|
||||
return KtFirAnalysisSession.createAnalysisSessionByFirResolveSession(firResolveSession, token)
|
||||
}
|
||||
): KtAnalysisSession = KtFirAnalysisSession.createAnalysisSessionByFirResolveSession(firResolveSession, token)
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ class ValidityAwareCachedValue<T>(
|
||||
) : ReadOnlyProperty<Any, T> {
|
||||
private val lazyValue = lazy(LazyThreadSafetyMode.PUBLICATION, init)
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun getValue(thisRef: Any, property: KProperty<*>): T {
|
||||
token.assertIsValidAndAccessible()
|
||||
return lazyValue.value
|
||||
|
||||
+4
-7
@@ -41,13 +41,10 @@ public abstract class KtSignatureSubstitutor : KtAnalysisSessionComponent() {
|
||||
substitutor: KtSubstitutor
|
||||
): KtVariableLikeSignature<S>
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
public open fun <S : KtCallableSymbol> substitute(symbol: S, substitutor: KtSubstitutor): KtCallableSignature<S> {
|
||||
return when (symbol) {
|
||||
is KtFunctionLikeSymbol -> substitute(symbol, substitutor)
|
||||
is KtVariableLikeSymbol -> substitute(symbol, substitutor)
|
||||
else -> unexpectedElementError("symbol", symbol)
|
||||
}
|
||||
public open fun <S : KtCallableSymbol> substitute(symbol: S, substitutor: KtSubstitutor): KtCallableSignature<S> = when (symbol) {
|
||||
is KtFunctionLikeSymbol -> substitute(symbol, substitutor)
|
||||
is KtVariableLikeSymbol -> substitute(symbol, substitutor)
|
||||
else -> unexpectedElementError("symbol", symbol)
|
||||
}
|
||||
|
||||
public abstract fun <S : KtFunctionLikeSymbol> substitute(symbol: S, substitutor: KtSubstitutor): KtFunctionLikeSignature<S>
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public class ConcurrentMapBasedCache<K, V>(public val map: ConcurrentMap<K, Any>
|
||||
|
||||
public object NullValue
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
public fun <V> Any.nullValueToNull(): V = when (this) {
|
||||
NullValue -> null
|
||||
else -> this
|
||||
|
||||
@@ -54,10 +54,8 @@ abstract class AbstractKtReference<T : KtElement>(element: T) : PsiPolyVariantRe
|
||||
|
||||
override fun toString() = this::class.java.simpleName + ": " + expression.text
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
protected open fun canBeReferenceTo(candidateTarget: PsiElement): Boolean = true
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
protected open fun isReferenceToImportAlias(alias: KtImportAlias): Boolean = false
|
||||
|
||||
override fun isReferenceTo(candidateTarget: PsiElement): Boolean {
|
||||
|
||||
-1
@@ -152,7 +152,6 @@ abstract class KtLightMethodImpl protected constructor(
|
||||
|
||||
override fun getBody() = null
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
abstract override fun findDeepestSuperMethod(): PsiMethod?
|
||||
|
||||
abstract override fun findDeepestSuperMethods(): Array<out PsiMethod>
|
||||
|
||||
-1
@@ -14,7 +14,6 @@ internal class FirThreadSafeCacheWithPostCompute<K : Any, V, CONTEXT, DATA>(
|
||||
) : FirCache<K, V, CONTEXT>() {
|
||||
private val map = ConcurrentHashMap<K, ValueWithPostCompute<K, V, DATA>>()
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun getValue(key: K, context: CONTEXT): V =
|
||||
map.getOrPut(key) {
|
||||
ValueWithPostCompute(
|
||||
|
||||
Reference in New Issue
Block a user