Suppress K2 specific warnings in the codebase
^KT-62472
This commit is contained in:
committed by
Space Team
parent
9e66a7b999
commit
704e2ef5c5
+1
@@ -577,6 +577,7 @@ internal class KtFirCallResolver(
|
||||
@Suppress("UNCHECKED_CAST") // safe because of the above check on targetKtSymbol
|
||||
KtSimpleFunctionCall(
|
||||
partiallyAppliedSymbol as KtPartiallyAppliedFunctionSymbol<KtFunctionLikeSymbol>,
|
||||
@Suppress("USELESS_CAST") // K2 warning suppression, TODO: KT-62472
|
||||
argumentMappingWithoutExtensionReceiver
|
||||
?.createArgumentMapping(partiallyAppliedSymbol.signature as KtFunctionLikeSignature<*>)
|
||||
?: LinkedHashMap(),
|
||||
|
||||
+1
-1
@@ -212,4 +212,4 @@ public inline fun prettyPrintWithSettingsFrom(other: PrettyPrinter, body: Pretty
|
||||
callsInPlace(body, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return PrettyPrinter(other.indentSize).apply(body).toString()
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -71,6 +71,7 @@ class KtLightMethodForDecompiledDeclaration(
|
||||
override fun findSuperMethodSignaturesIncludingStatic(checkAccess: Boolean): List<MethodSignatureBackedByPsiMethod> =
|
||||
PsiSuperMethodImplUtil.findSuperMethodSignaturesIncludingStatic(this, checkAccess)
|
||||
|
||||
@Suppress("OVERRIDE_DEPRECATION") // K2 warning suppression, TODO: KT-62472
|
||||
override fun findDeepestSuperMethod() = PsiSuperMethodImplUtil.findDeepestSuperMethod(this)
|
||||
|
||||
override fun findDeepestSuperMethods(): Array<out PsiMethod> = PsiSuperMethodImplUtil.findDeepestSuperMethods(this)
|
||||
@@ -117,4 +118,4 @@ class KtLightMethodForDecompiledDeclaration(
|
||||
visitor.visitElement(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -157,6 +157,7 @@ abstract class KtLightMethodImpl protected constructor(
|
||||
|
||||
override fun getBody() = null
|
||||
|
||||
@Suppress("OVERRIDE_DEPRECATION") // K2 warning suppression, TODO: KT-62472
|
||||
abstract override fun findDeepestSuperMethod(): PsiMethod?
|
||||
|
||||
abstract override fun findDeepestSuperMethods(): Array<out PsiMethod>
|
||||
|
||||
+1
@@ -120,6 +120,7 @@ internal class FirTowerDataContextAllElementsCollector : FirResolveContextCollec
|
||||
*
|
||||
* Otherwise, invokes this function recursively on the parent.
|
||||
*/
|
||||
@Suppress("NO_TAIL_CALLS_FOUND", "NON_TAIL_RECURSIVE_CALL") // K2 warning suppression, TODO: KT-62472
|
||||
private tailrec fun PsiElement.closestParentExpressionWithSameContextOrSelf(): KtExpression? {
|
||||
if (this is KtExpression) {
|
||||
if (
|
||||
|
||||
+1
@@ -88,6 +88,7 @@ internal class SymbolLightClassForFacade(
|
||||
for (fileSymbol in fileSymbols) {
|
||||
for (callableSymbol in fileSymbol.getFileScope().getCallableSymbols()) {
|
||||
if (callableSymbol !is KtFunctionSymbol && callableSymbol !is KtKotlinPropertySymbol) continue
|
||||
@Suppress("USELESS_IS_CHECK") // K2 warning suppression, TODO: KT-62472
|
||||
if (callableSymbol !is KtSymbolWithVisibility) continue
|
||||
if ((callableSymbol as? KtAnnotatedSymbol)?.hasInlineOnlyAnnotation() == true) continue
|
||||
if (multiFileClass && callableSymbol.toPsiVisibilityForMember() == PsiModifier.PRIVATE) continue
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ internal abstract class SymbolLightMethodBase(
|
||||
override fun findSuperMethodSignaturesIncludingStatic(checkAccess: Boolean): List<MethodSignatureBackedByPsiMethod> =
|
||||
PsiSuperMethodImplUtil.findSuperMethodSignaturesIncludingStatic(this, checkAccess)
|
||||
|
||||
@Suppress("OVERRIDE_DEPRECATION") // K2 warning suppression, TODO: KT-62472
|
||||
override fun findDeepestSuperMethod() = PsiSuperMethodImplUtil.findDeepestSuperMethod(this)
|
||||
|
||||
override fun findDeepestSuperMethods(): Array<out PsiMethod> = PsiSuperMethodImplUtil.findDeepestSuperMethods(this)
|
||||
|
||||
Reference in New Issue
Block a user