Remove descriptors from ToArrayLowering

This commit is contained in:
Georgy Bronnikov
2019-01-11 19:49:29 +03:00
parent c3652a47c6
commit 3531f47bfb
3 changed files with 256 additions and 168 deletions
@@ -128,6 +128,8 @@ class IrBuiltIns(
val stringType = string.toIrType()
val stringClass = builtIns.string.toIrSymbol()
val collectionClass = builtIns.collection.toIrSymbol()
val arrayClass = builtIns.array.toIrSymbol()
val throwableType = builtIns.throwable.defaultType.toIrType()
@@ -37,6 +37,7 @@ fun IrType.isNullableAny(): Boolean = isBuiltInClassType(KotlinBuiltIns::isAny,
fun IrType.isString(): Boolean = isNotNullClassType(KotlinBuiltIns.FQ_NAMES.string)
fun IrType.isNullableString(): Boolean = isNullableClassType(KotlinBuiltIns.FQ_NAMES.string)
fun IrType.isArray(): Boolean = isNotNullClassType(KotlinBuiltIns.FQ_NAMES.array)
fun IrType.isCollection(): Boolean = isNotNullClassType(KotlinBuiltIns.FQ_NAMES.collection.toUnsafe())
fun IrType.isNothing(): Boolean = isNotNullClassType(KotlinBuiltIns.FQ_NAMES.nothing)
fun IrType.isPrimitiveType(): Boolean =
isBuiltInClassType(KotlinBuiltIns::isPrimitiveClass, hasQuestionMark = false)