From a2d65e8a6051c8d2cdfcb03aa908a1e6c03b2a45 Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Thu, 14 Mar 2019 20:51:48 +0300 Subject: [PATCH] [IR] Code clean up --- .../common/utils/kotlinTypeBasedUtils.kt | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/utils/kotlinTypeBasedUtils.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/utils/kotlinTypeBasedUtils.kt index c59ee639a8b..3372f4475b4 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/utils/kotlinTypeBasedUtils.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/utils/kotlinTypeBasedUtils.kt @@ -6,26 +6,10 @@ package org.jetbrains.kotlin.backend.common.utils import org.jetbrains.kotlin.builtins.KotlinBuiltIns -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.types.toIrType import org.jetbrains.kotlin.ir.types.toKotlinType -import org.jetbrains.kotlin.ir.util.SymbolTable -import org.jetbrains.kotlin.resolve.DescriptorUtils -import org.jetbrains.kotlin.types.CommonSupertypes -import org.jetbrains.kotlin.types.typeUtil.isSubtypeOf // TODO: implement pure Ir-based function (see IrTypeUtils.kt) @Deprecated("Use pure Ir helper") -fun IrType.getPrimitiveArrayElementType() = KotlinBuiltIns.getPrimitiveArrayElementType(toKotlinType()) - -@Deprecated("Use pure Ir helper") -fun List.commonSupertype(symbolTable: SymbolTable) = - CommonSupertypes.commonSupertype(map(IrType::toKotlinType)).toIrType(symbolTable)!! - -@Deprecated("Use pure Ir helper") -fun IrType.isSubtypeOf(superType: IrType) = toKotlinType().isSubtypeOf(superType.toKotlinType()) - -@Deprecated("Use pure Ir helper") -fun IrType.isSubtypeOfClass(superClass: IrClassSymbol) = DescriptorUtils.isSubtypeOfClass(toKotlinType(), superClass.descriptor) +fun IrType.getPrimitiveArrayElementType() = KotlinBuiltIns.getPrimitiveArrayElementType(toKotlinType()) \ No newline at end of file