Removed useless as casts from compiler code

It allows compiling code with K2 and enabled `-Werror`
This commit is contained in:
Ivan Kochurkin
2023-10-20 13:44:09 +02:00
committed by Space Team
parent d50c6f1b6d
commit 1827df82c4
40 changed files with 77 additions and 117 deletions
@@ -75,7 +75,7 @@ internal class RawSubstitution(typeParameterUpperBoundEraser: TypeParameterUpper
},
type.isMarkedNullable, memberScope
) factory@{ kotlinTypeRefiner ->
val classId = (declaration as? ClassDescriptor)?.classId ?: return@factory null
val classId = declaration.classId ?: return@factory null
@OptIn(TypeRefinement::class)
val refinedClassDescriptor = kotlinTypeRefiner.findClassAcrossModuleDependencies(classId) ?: return@factory null