Skip to content

Commit 4cd7bf2

Browse files
committed
Kotlin: Small simplification
Also removes a cast
1 parent b0ae128 commit 4cd7bf2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,12 +1416,11 @@ open class KotlinUsesExtractor(
14161416
for(t in subbedSupertypes) {
14171417
when(t) {
14181418
is IrSimpleType -> {
1419-
when (t.classifier.owner) {
1419+
val owner = t.classifier.owner
1420+
when (owner) {
14201421
is IrClass -> {
1421-
val classifier: IrClassifierSymbol = t.classifier
1422-
val tcls: IrClass = classifier.owner as IrClass
14231422
val typeArgs = if (t.arguments.isNotEmpty() && mode is ExtractSupertypesMode.Raw) null else t.arguments
1424-
val l = useClassInstance(tcls, typeArgs, inReceiverContext).typeResult.id
1423+
val l = useClassInstance(owner, typeArgs, inReceiverContext).typeResult.id
14251424
tw.writeExtendsReftype(id, l)
14261425
}
14271426
else -> {

0 commit comments

Comments
 (0)