[JS IR BE] Implement isPrimitiveArray with pure Ir
This commit is contained in:
-3
@@ -17,9 +17,6 @@ import org.jetbrains.kotlin.types.typeUtil.isSubtypeOf
|
||||
|
||||
// TODO: implement pure Ir-based function (see IrTypeUtils.kt)
|
||||
|
||||
@Deprecated("Use pure Ir helper")
|
||||
fun IrType.isPrimitiveArray() = KotlinBuiltIns.isPrimitiveArray(toKotlinType())
|
||||
|
||||
@Deprecated("Use pure Ir helper")
|
||||
fun IrType.getPrimitiveArrayElementType() = KotlinBuiltIns.getPrimitiveArrayElementType(toKotlinType())
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.util
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns.FQ_NAMES
|
||||
import org.jetbrains.kotlin.builtins.UnsignedTypes
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||
@@ -91,3 +92,4 @@ private inline fun IrType.isTypeFromKotlinPackage(namePredicate: (Name) -> Boole
|
||||
} else return false
|
||||
}
|
||||
|
||||
fun IrType.isPrimitiveArray() = isTypeFromKotlinPackage { it in FQ_NAMES.primitiveArrayTypeShortNames }
|
||||
Reference in New Issue
Block a user