diff --git a/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/CodegenUtil.kt b/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/CodegenUtil.kt index 9cb95405fe6..fc5f15fb642 100644 --- a/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/CodegenUtil.kt +++ b/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/CodegenUtil.kt @@ -98,9 +98,8 @@ object CodegenUtil { @JvmStatic fun getSuperClassBySuperTypeListEntry(specifier: KtSuperTypeListEntry, bindingContext: BindingContext): ClassDescriptor? { val superType = bindingContext.get(BindingContext.TYPE, specifier.typeReference!!) - ?: error("superType should not be null: ${specifier.text}") - return superType.constructor.declarationDescriptor as? ClassDescriptor + return superType?.constructor?.declarationDescriptor as? ClassDescriptor } @JvmStatic