diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/dce/JsUsefulDeclarationProcessor.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/dce/JsUsefulDeclarationProcessor.kt index 8d4185b1b9c48..6350cf9f825a5 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/dce/JsUsefulDeclarationProcessor.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/dce/JsUsefulDeclarationProcessor.kt @@ -71,7 +71,7 @@ internal class JsUsefulDeclarationProcessor( } context.reflectionSymbols.getKClass -> { - addConstructedClass(expression.getTypeArgument(0)!!.classifierOrFail.owner as IrClass) + expression.getTypeArgument(0)?.classOrNull?.owner?.let(::addConstructedClass) } context.intrinsics.jsObjectCreateSymbol -> {