diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index 2856c0b489f..b43d7724603 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -1415,12 +1415,11 @@ open class KotlinUsesExtractor( for(t in subbedSupertypes) { when(t) { is IrSimpleType -> { - when (t.classifier.owner) { + val owner = t.classifier.owner + when (owner) { is IrClass -> { - val classifier: IrClassifierSymbol = t.classifier - val tcls: IrClass = classifier.owner as IrClass val typeArgs = if (t.arguments.isNotEmpty() && mode is ExtractSupertypesMode.Raw) null else t.arguments - val l = useClassInstance(tcls, typeArgs, inReceiverContext).typeResult.id + val l = useClassInstance(owner, typeArgs, inReceiverContext).typeResult.id tw.writeExtendsReftype(id, l) } else -> {