Suppress K2 specific warnings in the codebase

^KT-62472
This commit is contained in:
Dmitriy Novozhilov
2023-10-10 14:32:35 +03:00
committed by Space Team
parent 9e66a7b999
commit 704e2ef5c5
43 changed files with 58 additions and 8 deletions
@@ -105,6 +105,7 @@ abstract class UsefulDeclarationProcessor(
addReachabilityInfoIfNeeded(from, this, description, isContagiousOverridableDeclaration)
if (isContagiousOverridableDeclaration) {
@Suppress("USELESS_CAST") // K2 warning suppression, TODO: KT-62472
contagiousReachableDeclarations.add(this as IrOverridableDeclaration<*>)
}
@@ -52,6 +52,7 @@ open class KotlinSourceFileMap<out T>(files: Map<KotlinLibraryFile, Map<KotlinSo
operator fun get(libFile: KotlinLibraryFile, sourceFile: KotlinSourceFile): T? = get(libFile)?.get(sourceFile)
}
@Suppress("DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE") // K2 warning suppression, TODO: KT-62472
class KotlinSourceFileMutableMap<T>(
private val files: MutableMap<KotlinLibraryFile, MutableMap<KotlinSourceFile, T>> = hashMapOf()
) : KotlinSourceFileMap<T>(files) {